Re: [Ironruby-core] requiring .NET assemblies
ah k I'll try that thanks On Feb 19, 2008 4:34 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: I got basically the same result when trying to use a SubSonic-generated DLL from IronPython. The Assembly.GetTypes function wasn't able to resolve the generated classes because Could not load file or assembly 'SubSonic, Version=2.0.3.0, Culture=neutral, PublicKeyToken=eadb47849839a332' or one of its dependencies The problem went away when I copied the SubSonic DLLs into the same directory as the executable. On Feb 18, 2008 6:19 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: Yep On Feb 19, 2008 1:37 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: So, the Customer class was generated by SubSonic and is contained in DataAccess.Subsonic.dll? Do you get the same results by leaving out the include and saying DataAccess::SubSonic::Customer.new instead? On Feb 18, 2008 12:30 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: Hi, I ran into a pretty weird issue, I tried to use some of the .NET ORM's with IronRuby. I haven't investigated with the debugger turned on yet but here's what I observed I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. Linq2Sql doesn't have a problem. What the first 3 ORM's have in common is that I can use the types in the actual ORM library. All of those ORM's require you to have a generic base class. If I include other types in the assembly (non generic base classes) then I can just use those classes. When I create a type with a generic base class that is defined in the same assembly I can use that class in IronRuby For SubSonic a Customer class could look like: *public class Customer : ActiveRecordCustomer{ // model code here }* The output from the console session that shows the behavior. I tried a lot of different approaches but it always boils down to the same error. *IronRuby 0.1 on .NET 2.0.50727.1434 Copyright (c) Microsoft Corporation. All rights reserved. Note that local variables do not work today in the console. As a workaround, use globals instead (eg $x = 42 instead of x = 42). require 'mscorlib' = true require Dir.getwd + '/SubSonic.dll' = true require Dir.getwd + '/DataAccess.SubSonic.dll' = true include DataAccess::SubSonic = Object Customer.new IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant Object::Customer (NameError) from :0:in `main' from :0:in `##16' exit* Is this a bug or is it a case of me missing something? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] requiring .NET assemblies
Thanks a lot that works :) On Feb 19, 2008 4:34 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: I got basically the same result when trying to use a SubSonic-generated DLL from IronPython. The Assembly.GetTypes function wasn't able to resolve the generated classes because Could not load file or assembly 'SubSonic, Version=2.0.3.0, Culture=neutral, PublicKeyToken=eadb47849839a332' or one of its dependencies The problem went away when I copied the SubSonic DLLs into the same directory as the executable. On Feb 18, 2008 6:19 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: Yep On Feb 19, 2008 1:37 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: So, the Customer class was generated by SubSonic and is contained in DataAccess.Subsonic.dll? Do you get the same results by leaving out the include and saying DataAccess::SubSonic::Customer.new instead? On Feb 18, 2008 12:30 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: Hi, I ran into a pretty weird issue, I tried to use some of the .NET ORM's with IronRuby. I haven't investigated with the debugger turned on yet but here's what I observed I tried this with ActiveRecord from Castle, SubSonic and LightSpeed. Linq2Sql doesn't have a problem. What the first 3 ORM's have in common is that I can use the types in the actual ORM library. All of those ORM's require you to have a generic base class. If I include other types in the assembly (non generic base classes) then I can just use those classes. When I create a type with a generic base class that is defined in the same assembly I can use that class in IronRuby For SubSonic a Customer class could look like: *public class Customer : ActiveRecordCustomer{ // model code here }* The output from the console session that shows the behavior. I tried a lot of different approaches but it always boils down to the same error. *IronRuby 0.1 on .NET 2.0.50727.1434 Copyright (c) Microsoft Corporation. All rights reserved. Note that local variables do not work today in the console. As a workaround, use globals instead (eg $x = 42 instead of x = 42). require 'mscorlib' = true require Dir.getwd + '/SubSonic.dll' = true require Dir.getwd + '/DataAccess.SubSonic.dll' = true include DataAccess::SubSonic = Object Customer.new IronRuby.Libraries:0:in `ConstantMissing': uninitialized constant Object::Customer (NameError) from :0:in `main' from :0:in `##16' exit* Is this a bug or is it a case of me missing something? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Linq to SQL with IronRuby... Is it Possible...?
Hi I'll put an article up on the manning site this week that shows you how to use various .NET ORM's with IronRuby At this stage I can't show you an example of IronRuby with ASP.NET MVC but it should be possible in the future I think. For ASP.NET MVC we need support for custom attributes. hth Ivan On Feb 19, 2008 7:04 PM, Web Reservoir [EMAIL PROTECTED] wrote: hello, i'm a newbie here. joined now. i'm exploring ironruby from scratch. few questions to start with... LINQ to SQL... is a nice thing currently supported in C# and Vb.Net. i would like to know.. if this has been implemented now or its too early to ask. when will it be supported...? Which other ORM's are under consideration? Will IronRuby work smoothly with Asp.Net MVC? I would like to peep into a samll sample code for IronRuby with Asp.Net MVC and LINQ to SQL with IronRuby... Hope,,,i have not asked for more. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] can i use asp.net just like C# and Vb.net
Allow me to correct you on certain points here (1) Code behind/Code besides support with asp.net -- ROR does not have it. RoR is MVC with passive views so you're not coupling your event handling from your view to your controller (on which an action can be viewed as the complete code behind/beside file from asp.NET). And quite frankly for web development I, personally, fail to see why you would want to use an event driven model. 2) Master Pages ---ROR does not have it except helper methods and something alike for viewing Master pages are called layouts in RoR. If you want to use a master page to implement common logic that's what the Application base class is for. 3 + 4 + 6) are all consequences of using the .NET framework and will work when IronRuby is complete. For windows forms development with Ruby you can take a look at the Connector for .NET from the Ruby In Steel guys or rubyclr 5) Good if you're working in or with a Microsoft shop 7) IIS support = you can reverse proxy to mongrel at this time and that should also work fine when IronRuby is implemented but also for RoR not just ASP.NET MVC or webforms. This doesn't mean initial deployment is a walk in the park, it is rather painful. RoR doesn't support all the features implemented in SQL Server if that's what you're getting at. That was a deliberate design choice they made for portability. So they support the common features on every platform. But it works fine with SQL server if you use it as intended. If you're talking about getting a unix based box to talk to SQL Server that requires some configuration and setup on the OS level for ODBC etc. That is what makes it slightly harder I guess. 8) Granted this one deployment can be a RPITA until you have your environments in sync and capistrano can make that a lot easier. It looks like the problems you are having are not related to the Rails framework but are rather due to the fact that MRI isn't implemented in .NET. hope this helps a little. Ivan On Mon, Mar 10, 2008 at 4:50 PM, Rahil Kantharia [EMAIL PROTECTED] wrote: John Lam (DLR) wrote: Can you elaborate on this idea with some code fragments of how you would like IronRuby + MVC to look like? Where would you like to see this? In Views, in Controllers? Where does it make sense and where does it not make sense. How exactly is ASP.NET MVC better than ROR? Can you put some code frags side-by-side where you would show how something done in IronRuby + MVC would be superior to something done in ROR? Concrete examples, please. Thanks, -John --- Hi John, As a Fresh student, i can give few points rather than codes and working examples, since i am on a learning stage and i have not seen a single code so far based on Asp.Net MVC + IronRuby... I can quickly point few great advantages as below, with ROR is missing. (1) Code behind/Code besides support with asp.net -- ROR does not have it. (2) Master Pages ---ROR does not have it except helper methods and something alike for viewing (3) BCL ( Great, BCL with almost 13,000 classes --- ROR does not come near by ) (4) Support to bring the classes from other languages like Iropython, VB. C# (5) Great MISCROSOFT brand name, that assures and gives a piece of mind (6) WinForms and MVC way... Both the ways i can work --- ROR has only MVC (7) IIS + SQL Server support--- ROR developers are still struggling for this (8) Deployment as easy as click. ( Not easy with ROR ) Well i think, my other seniors around can write more on this, since as a student i have limited knowledge currently, but this is what i have gathered. P.S:- BTW, dear John, you are a genius in this segment, you know much much better than me, are you testing my knowledge level...? One thing i can beat you here is... I am more IronRuby fan than you. Cheers Rahil -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] dynamic silverlight
Yes thanks for that. I realised that 2 minutes after I sent my original email. I did like the idea so i created my own dsl.rb script that basically does the same :) On Tue, Mar 11, 2008 at 12:29 PM, Jimmy Schementi [EMAIL PROTECTED] wrote: Ivan, The dsl command simply copied the files from the hello_world sample in http://dynamicsilverlight.net/dynamic-silverlight.zip to a new directory. You can start off with the hello_world sample. I haven't included that command in there yet, but it'll be included soon. ~Jimmy *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Saturday, March 08, 2008 1:41 AM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] dynamic silverlight Where do I have to go to get the dynamic silverlight bits? I've got chiron going but am still looking for the dsl command. Do I have to monitor the silverlight site for that? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] console ShowASTs not working ?
Hi I tried to view what AST's was being generated when I executed a very simple class with the following command line rbx -X:ShowASTs test.rb class HelloWorld def initialize @msg = hello world end def print puts @msg end end h = HelloWorld.new h.print I tried doing that on windows in powershell, cmd and on OSX with mono I also tried a couple of other command switches but none of them seem to do anything, is that because it's not supposed to be working? the other command options i tried were -X:TabCompletion, -X:DumpASTs and -X:ShowRules None of them seem to have any effect, do I submit a bug for this? Thanks Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] console ShowASTs not working ?
Cool it's working for me too, it was just me being stupid. On Wed, Mar 12, 2008 at 11:33 PM, Sanghyeon Seo [EMAIL PROTECTED] wrote: -X:ShowASTs works for me. Linux, Mono 1.2.6, IronRuby r76. -- Seo Sanghyeon ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Console arguments broken?
Ok It seems to only be broken in PowerShell when I use cmd things work. On Fri, Mar 14, 2008 at 11:46 AM, Brian J. Cardiff [EMAIL PROTECTED] wrote: the attach. sorry. On Thu, Mar 13, 2008 at 8:45 PM, Brian J. Cardiff [EMAIL PROTECTED] wrote: rbx -X:TabCompletion 1.TAB It throws and exception dialog (attached) rbx -X:ShowASTs 1 It shows ok 1+1 It shows ok rbx -X:AutoIndent don't sure how to use this funcionality, but console load and seems to work. XP SP2 VS2008 On Thu, Mar 13, 2008 at 8:30 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: Do the -X:... console arguments work for anybody? » C:\tools\IronRuby\build\debug\rbx -X:TabCompletion mscorlib:0:in `CanonicalizePath': The given path's format is not supported. (System::NotSupportedException) from mscorlib:0:in `CreateListFromExpressions' from mscorlib:0:in `AddPathList' from mscorlib:0:in `.ctor' from mscorlib:0:in `Init' from mscorlib:0:in `.ctor' » C:\tools\IronRuby\build\debug\rbx -X:ShowASTs mscorlib:0:in `CanonicalizePath': The given path's format is not supported. (System::NotSupportedException) from mscorlib:0:in `CreateListFromExpressions' from mscorlib:0:in `AddPathList' from mscorlib:0:in `.ctor' from mscorlib:0:in `Init' from mscorlib:0:in `.ctor' » rbx -X:AutoIndent mscorlib:0:in `CanonicalizePath': The given path's format is not supported. (System::NotSupportedException) from mscorlib:0:in `CreateListFromExpressions' from mscorlib:0:in `AddPathList' from mscorlib:0:in `.ctor' from mscorlib:0:in `Init' from mscorlib:0:in `.ctor' Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Brian J. Cardiff bcardiff(?)gmail.com . -- Brian J. Cardiff bcardiff(?)gmail.com . ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] On Console options
Ooops.. I hit tab-enter.. sorry for that. -- Forwarded message -- From: Ivan Porto Carrero [EMAIL PROTECTED] Date: Fri, Mar 14, 2008 at 10:50 AM Subject: On Console options To: ironruby-core@rubyforge.org Hi, I'm sure this is another case of PEBKAC but I've been looking in the code and I think that's how it's supposed to work. When I want to use -X:ILDebug or -X:SaveAssemblies I assume the rbx command also expects the -X:AssembliesDir argument, is that correct? Which brings me to my next point: When I want to execute » rbx -X:AssembliesDir C:\projects\temp\ir_test test.rb mscorlib:0:in `CanonicalizePath': The given path's format is not supported. (System::NotSupportedException) from mscorlib:0:in `CreateListFromExpressions' from mscorlib:0:in `AddPathList' from mscorlib:0:in `.ctor' from mscorlib:0:in `Init' from mscorlib:0:in `.ctor' Is that not how I'm supposed to execute the test.rb file when I want to use the save assemblies or ILDebug? Thanks Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Active Record Or LINQ with IronRuby...?
All of them have their advantages and disadvantages. Linq2Sql only works for MS Sql Server, but gives you a graphical designer for your objects. It implements a unit of work which reduces the number of database calls. It doesn't however support many-to-many relations, and it depends how much value you give to highly performant sql. Some of the sql it generates is quite smart, I just think it's a pity they chose to use hierarchical fetches instead of spans (which is the way it was done in ObjectSpaces). Linq2Sql allows the use of stored procedures which is one way you could circumvent performance bottlenecks. ActiveRecord, I assume you're talking about the Rails implementation of ActiveRecord. It offers more flexibility than Linq2Sql because supports a multitude of databases. The sql it generates is also not always the most performant but like Linq2Sql it will do just fine, it allows for you to optimize your queries by writing sql yourself or you could possible (ab)use that feature to execute stored procedures on sql server. From the 3 choices you've given DataMapper is the most flexible, it is less opinionated than ActiveRecord but doesn't support as many databases as ActiveRecord does, for example it doesn't support ms sql server but mysql, postgres and sqlite3. Because it's less opinionated you can use it with legacy databases where ActiveRecord from rails makes this hard. DataMapper uses the identity map pattern which allows for reuse of objects within the same session, where ActiveRecord does not AFAIK. Both ActiveRecord and DataMapper support many-to-many relations and datamapper allows for more granular control over the visibility of the properties. In combination with IronRuby I, personally, would probably not use any of these in my own applications :) But rather use one of the other existing .NET ORM's like NHibernate, SubSonic, LLBLGen, LightSpeed, ... But from the 3 choices you gave above I'd say it depends on the situation where ActiveRecord gives you the best options for different infrastructures. Linq2Sql gives you the best SqlServer support (and I guess that it would be the fastest too). DataMapper gives you some options with legacy databases and I imagine it wouldn't be too hard to implement a ms sql driver, at which point it becomes a more attractive option than ActiveRecord IMHO. And lastly LINQ and Linq2Sql are 2 different things. LINQ allows you to query in-memory collections and Linq2Sql allows you to query a database with that same syntax. I think LINQ is valuable regardless of which ORM you use because of the easy access you have for performing complex manipulations on collections, although it comes at a certain performance cost. Seen as you're using Ruby I wouldn't worry too much about the performance cost of LINQ unless you have actual performance problems at which point you can optimize the code that is responsible for the bottleneck. The opinions above are my own opinions, other people most likely have different ideas around this subject. Hope this helps, Ivan On Fri, Mar 14, 2008 at 8:19 PM, Rahil Kantharia [EMAIL PROTECTED] wrote: Hi, In my learning process, i am confused with the Advantages of ORM like ActiveRecord and Linq to SQL I would like to know... what majority developers think on this point. Is it worth to go with LINQ to take full advantages or Get use to ActiveRecord / Data Mapper for a proven ORM option. Thanks -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Active Record Or LINQ with IronRuby...?
In my book I will use the ActiveRecord from Rails for most of the examples because it will be the most well-known and I suspect the one where most developers are curious about. I will show how to leverage some of the other ORM's to show that there are other options available. I think SubSonic is a safe option, it is endorsed by Microsoft and won't go away anytime soon. I'm not that familiar with SubSonic yet but from what I've seen, it's fairly easy to get started with. I don't know if it will work with IronRuby because I haven't tried that. It's something I have planned to look at next week. On Fri, Mar 14, 2008 at 9:37 PM, Rahil Kantharia [EMAIL PROTECTED] wrote: Thanks Ivan for the excellent guidance. You helped me move ahead, but i am still in confused stage in choosing the right ORM. Perhaps your book will explain more on this. I think i should accept your idea to go SubSonic Way, since Subsonic understands Active Record much better and its a straight implementation of Active Record for .Net. Thats what i have heard, i am not too sure. Refer this new blog here by Rob Conery... http://blog.wekeroad.com/2008/03/11/subsonic-21-beta-2-available-now/#comments Rob Conery answers... Linq To SubSonic is in the works as we speak… This sounds good enough. Lets see, what more opinions we get here. Still enough time to decide. Your expert guidance is always welcomed. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Active Record Or LINQ with IronRuby...?
Because IronRuby is an implementation of the Ruby language you will be able to use ActiveRecord with anything. I want to note again that there won't be a thing like IronRuby on Rails. The rails framework will just run on IronRuby just like it now runs on CRuby and JRuby. The database I'm using is irrelevant when I'm using ActiveRecord as long as I don't set indexes it should run on sqlite as well for example. hth Ivan On Fri, Mar 14, 2008 at 10:13 PM, Softmind Technology [EMAIL PROTECTED] wrote: Ivan Porto Carrero wrote: In my book I will use the ActiveRecord from Rails for most of the examples --- Dear Ivan, You mean to say you will be using ActiveRecord with IronRuby...? Will Active Record work only with IronRuby on Rails or within Asp.Net webforms and Asp.Net as Well...? Which database are you using in your book. I mean MySQL / SQLite or SQL 2005...? You have just raised my expectations with smile. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] hosting ironruby: globals confusion
I figured out that ScriptRuntime and ScriptScope are still language agnostic. So if you want to host IronRuby in your application you're always looking at Level 2 hosting as soon as you want some communication between Host and IronRuby, because you need the RubyEngine. I'm still a bit unsure of how the ScriptScope ties in to everything. I understand that the ScriptRuntime is like the complete host for dyn languages and you can create a bunch of them they will always run in isolation. But how does ScriptScope work because so far I've been unsuccessful in talking to a ScriptScope ? Is this hosting API still too much of a moving target to really get into it? Ivan Porto Carrero wrote: Hi, I updated the hosting wiki page to work with the current revision. But this raises a couple of questions. I'm just working my way through the dlr-hosting-spec. And if I read it correctly then there are 3 levels of hosting/integration possible. Now AFAICT level 1 hosting is only supposed to work with external files, because for compiling to a source unit you need a different class than either ScriptRuntime or ScriptScope I was expecting when I set a variable in globals that it becomes a global variable or do I have to access that differently? So I tried the following bit of code: ScriptRuntime runtime = IronRuby.CreateRuntime(); runtime.Globals.SetVariable(version, simplest test possible with a variable succeeded); runtime.ExecuteFile(commands.rb); and the file commands.rb contains one line of ruby code: puts $version put the output of that code is nil instead of the expected string. This returns nil. I have trouble reconciling that with what I read in the hosting spec. Because this should be totally doable with Level 1 hosting or am I wrong in this assumption? When I create a ScriptRuntime shouldn't it then have a DefaultScope (Globals) that is language-specific to ruby because I create it with the static method on IronRuby? Also for as far as i understand it a ScriptScope is like a container for your scripts so globals in that container are only alive in that script scope? Anyway when I go and use level 2 hosting because I need the execution context and script engine and these are only introduced in level 2 hosting. I can set global variables and then things do work ScriptRuntime runtime = IronRuby.CreateRuntime(); ScriptEngine rubyengine = IronRuby.GetEngine(runtime); RubyExecutionContext ctx = IronRuby.GetExecutionContext(runtime); ctx.GlobalVariables[SymbolTable.StringToId(variable)] = simplest test possible with a variable succeeded; runtime.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString(puts \#{$variable}\)); And in the level 2 hosting sample the RubyExecutionContext seems to do what I was expecting ScriptScope to do. Am I reading the spec wrong ? Cheers Ivan -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Manipulating Silverlight controls dynamically from IronRuby - is it currently possible ?
Hi Yes the button control is available. The code that goes with that blog post uses a button. I want to improve that code still because you can do more with IronRuby than that. I just need some time to do it. http://flanders.co.nz/2008/04/06/an-ironruby-digg-client/ Basically you need to add the assemblies System.Windows.Controls and System.Windows.Controls.Extended to your app folder. You can find those assemblies in program files\microsoft sdks\Silverlight\v2.0 You also need to add a AppManifest.xaml file to your app folder and that should contain: Deployment xmlns=http://schemas.microsoft.com/client/2007/deployment; xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml; RuntimeVersion=2.0.30226.00 EntryPointAssembly=Microsoft.Scripting.Silverlight EntryPointType=Microsoft.Scripting.Silverlight.DynamicApplication Deployment.Parts !-- Add additional assemblies here -- AssemblyPart Name=Microsoft.Scripting.Silverlight Source=Microsoft.Scripting.Silverlight.dll / AssemblyPart Source=Microsoft.Scripting.dll / !-- Silverlight SDK controls assemblies -- AssemblyPart Source=System.Windows.Controls.dll / AssemblyPart Source=System.Windows.Controls.Extended.dll / AssemblyPart Source=System.Xml.Linq.dll / AssemblyPart Source=IronRuby.dll / AssemblyPart Source=IronRuby.Libraries.dll / /Deployment.Parts /Deployment from then on you can use the button control but you still need to add the namespace to your xaml file. I have this for a button. UserControl x:Class=System.Windows.Controls.UserControl xmlns=http://schemas.microsoft.com/client/2007; xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml; xmlns:c=clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls xmlns:e=clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Extended Grid e:WatermarkedTextBox x:Name=search_textbox Watermark=Topic... FontFamily=Trebuchet MS Grid.Column=1 FontSize=12 Padding=1,3,1,1 / c:Button Content=Search x:Name=search_button Style={StaticResource SearchButton} / /Grid hth Ivan On Wed, Apr 9, 2008 at 12:16 AM, Thibaut Barrère [EMAIL PROTECTED] wrote: Hi, Is it currently possible to add children to an existing Silverlight control from the ruby code side ? (like in the IronPython version seen on http://www.voidspace.org.uk/ironpython/webide/webide.html - great stuff btw Michael!) And an extra question: is the Button control available from the silverlight build on http://dynamicsilverlight.net ? cheers, -- Thibaut ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Problems compiling IronRuby on Mac Leopard
oh I have a script that should do all that. i can email it to you if you want. I also have that blogpost up that explains everything http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/ On 6/05/2008, at 10:41 PM, Ben Aurel wrote: that's my line in ~/.bash_profile: ... export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig/ ,... and this is what I get with $ pkg-config --variable=libdir mono /opt/mono/lib/pkgconfig/../../lib should this be correct - no? What's wrong here? On Tue, May 6, 2008 at 12:15 PM, Sanghyeon Seo [EMAIL PROTECTED] wrote: 2008/5/6 Ben Aurel [EMAIL PROTECTED]: What's needed that the System.dll can be resolved? You need to have pkg-config correctly configured. $ pkg-config --variable=libdir mono /usr/lib If you don't get any output, try setting PKG_CONFIG_PATH so that pkg-config can find mono.pc. -- Seo Sanghyeon ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby r100 on Mono
ok looks like you need the gem pathname2 sudo gem install pathname2 (might be pathname my memory fails me) On 9/05/2008, at 3:20 PM, Robert Bazinet wrote: Ivan, I wanted to see if you were paying attention..yes, what I sent over shows the command from the WRONG directory. I was in that directory and just used the command history to run the command so I could send it over to the group. The command is failing and I am sending the right one now. You can see I am not nuts, just copying and pasting the wrong info. So, here it is: rbazinet: ~/ironruby$ rake compile mono=1 (in /Users/rbazinet/ironruby) rake aborted! Could not find RubyGem pathname2 (= 0) /Users/rbazinet/ironruby/rakefile:5 (See full trace by running task with --trace) rbazinet: ~/ironruby$ rake --trace compile mono=1 (in /Users/rbazinet/ironruby) rake aborted! Could not find RubyGem pathname2 (= 0) /Library/Ruby/Site/1.8/rubygems.rb:523:in `report_activate_error' /Library/Ruby/Site/1.8/rubygems.rb:131:in `activate' /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem' /Users/rbazinet/ironruby/rakefile:5 /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `raw_load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in `load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in `load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Does this make more sense?? Thanks, Rob On Thu, May 8, 2008 at 11:06 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: This happens to me sometimes but isn't related to ironruby in my case. if you do ls Rake* does something show up? Rake is complaining about the fact that it can't find its instruction set (Rakefile). From the output I see, it doesn't even start to build I merely suggested navigating to the folder because of he prompt I see rbazinet:~$ which would indicate you tried to run the rake command in your home drive instead of in rbazinet:~/ironruby $ But of course I'm making the assumption that your prompt indicates in which folder you are. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Rob Bazinet InfoQ Ruby and .NET Editor http://www.accidentaltechnologist.com ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] ironruby in action is available in EAP
Hi My book for manning went into EAP. http://manning.com/carrero Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Signal.trap
AFAICT they use INT, TERM, HUP, USR1, USR2 (most of them in the fastcgi handler, but mongrel and thin use them as well) thin also uses QUIT That's what i got from quickly running grep over my rails gems I've asked koz if I left some out and if I did I'll let you know which ones are missing. On Mon, May 19, 2008 at 12:11 PM, Wayne Kelly [EMAIL PROTECTED] wrote: I'm not sure I can answer that question in it's totality as I'm not familiar with much of the Rails framework. But the examples that I've seen so far have been trapping the SIGINT and/or TERM signals in order to perform a graceful controlled shutdown. Cheers, Wayne. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tomas Matousek Sent: Monday, 19 May 2008 10:00 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Signal.trap What signals are used in Rails and what for? Tomas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo Sent: Sunday, May 18, 2008 9:32 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Signal.trap 2008/5/18 Michael Letterle [EMAIL PROTECTED]: PInvokes would, of course, make it non-portable to mono...or silverlight for that matter. So no, I don't think it's a good idea :) Well, Mono supports P/Invoke, and Ruby.NET's Signal code actually worked fine on Mono. (In this case, signal() function is portable between Windows and Unix.) Silverlight would be problematic indeed. But then, why would Ruby code in Silverlight use methods in Signal module? -- Seo Sanghyeon ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Dynamic Lanugages in Silverlight 2 Beta 2
Sweet. That means I can compile my dynamic script control for the all the DLR based languages. On Wed, Jun 11, 2008 at 9:29 AM, Ben Hall [EMAIL PROTECTED] wrote: Excellent!! A new set of IronPython, IronRuby and DLR assemblies. I can actually get my app working tonight! Thanks Ben Blog.BenHall.me.uk On Tue, Jun 10, 2008 at 10:08 PM, Jimmy Schementi [EMAIL PROTECTED] wrote: http://blog.jimmy.schementi.com/2008/06/dynamic-languages-in-silverlight-2-beta.html With the announcement of Silverlight 2 Beta 2, the Silverlight Dynamic Languages SDK has been updated as well! Download the Dynamic Languages SDK: http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=14254 There's a lot of new stuff here, from new versions of IronRuby, IronPython, Managed JScript, and the Dynamic Languages Runtime, to more sample. Also, there are now three packages: SDK, SDK Samples, and SDK Source. * SDK: Necessary package to create dynamic language Silverlight applications. * SDK Samples: a bunch of Ruby, Python, and JScript samples. Best bet is to unzip this in the SDK directory. * SDK Source Code: If you want to modify the languages/DLR/Silverlight integration, you can do so here, and build using the given Solution file in Visual Studio. This will create a /bin directory with the identical binaries as the /bin directory in the SDK, however without DLL signing. Enjoy! ~Jimmy ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Dynamic Lanugages in Silverlight 2 Beta 2
No it's for xaml and eventually silverlight too probably. At the moment I only have a little experiment online and I'm now the more useful version. Anyway I wanted a way to write my controls in IronRuby and then have them participate in a xaml layout as any CLR based control can do. At this moment I've made it so that you set the properties on the DLR based control with a language specific hash/dictionary. So if you use it in python you set the properties on the control using a python dictionary or at least that's the plan but for that I needed a common DLR which I have now. It's up on codeplex. http://codeplex.com/dynamicscriptcontrol On Wed, Jun 11, 2008 at 10:30 AM, Jimmy Schementi [EMAIL PROTECTED] wrote: What dynamic script control is this? For ASP.NET? Similar to this? http://blogs.msdn.com/dmitryr/archive/2008/05/06/dynamic-client-script-for-silverlight-2-beta2.aspx PS. I'm gonna get it updated for SL2Beta2 shortly … ~js *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Tuesday, June 10, 2008 2:32 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] Dynamic Lanugages in Silverlight 2 Beta 2 Sweet. That means I can compile my dynamic script control for the all the DLR based languages. On Wed, Jun 11, 2008 at 9:29 AM, Ben Hall [EMAIL PROTECTED] wrote: Excellent!! A new set of IronPython, IronRuby and DLR assemblies. I can actually get my app working tonight! Thanks Ben Blog.BenHall.me.uk On Tue, Jun 10, 2008 at 10:08 PM, Jimmy Schementi [EMAIL PROTECTED] wrote: http://blog.jimmy.schementi.com/2008/06/dynamic-languages-in-silverlight-2-beta.html With the announcement of Silverlight 2 Beta 2, the Silverlight Dynamic Languages SDK has been updated as well! Download the Dynamic Languages SDK: http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=14254 There's a lot of new stuff here, from new versions of IronRuby, IronPython, Managed JScript, and the Dynamic Languages Runtime, to more sample. Also, there are now three packages: SDK, SDK Samples, and SDK Source. * SDK: Necessary package to create dynamic language Silverlight applications. * SDK Samples: a bunch of Ruby, Python, and JScript samples. Best bet is to unzip this in the SDK directory. * SDK Source Code: If you want to modify the languages/DLR/Silverlight integration, you can do so here, and build using the given Solution file in Visual Studio. This will create a /bin directory with the identical binaries as the /bin directory in the SDK, however without DLL signing. Enjoy! ~Jimmy ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Dynamic Lanugages in Silverlight 2 Beta 2
Hi Ben, I've sent you the files. Now to answer the question as to why there is a need for building against different assemblies. Because Silverlight includes the CoreCLR something like a CLR lite :) it has a different mscorlib with less stuff in it. Since mscorlib is the base library of the CLR you need to have a different build for everything that relies on that CLR lite. Which is why you need a different System and so on. So when you just use one or the other visual studio will take care of selecting the appropriate assemblies for you. In this case you had to do it manually. I don't think that will change in the future, what will change is that you will be able to download IronRuby or IronPython or so and you can then be sure that both rely on the same DLR so that you can support any of those languages. Cheers, Ivan On Wed, Jun 11, 2008 at 11:30 AM, Ben Hall [EMAIL PROTECTED] wrote: Hi Ivan, That would be great! Sent you a direct mail from my other account. Cheers Ben On Wed, Jun 11, 2008 at 12:01 AM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: I'm happy to send you the binaries if you want them. On Wed, Jun 11, 2008 at 10:51 AM, Ben Hall [EMAIL PROTECTED] wrote: Should these assemblies work with WinForms applications? I just posted a message on the IP list with an exception i'm getting. Guess I should have posted in here :) On Tue, Jun 10, 2008 at 11:44 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: No it's for xaml and eventually silverlight too probably. At the moment I only have a little experiment online and I'm now the more useful version. Anyway I wanted a way to write my controls in IronRuby and then have them participate in a xaml layout as any CLR based control can do. At this moment I've made it so that you set the properties on the DLR based control with a language specific hash/dictionary. So if you use it in python you set the properties on the control using a python dictionary or at least that's the plan but for that I needed a common DLR which I have now. It's up on codeplex. http://codeplex.com/dynamicscriptcontrol On Wed, Jun 11, 2008 at 10:30 AM, Jimmy Schementi [EMAIL PROTECTED] wrote: What dynamic script control is this? For ASP.NET? Similar to this? http://blogs.msdn.com/dmitryr/archive/2008/05/06/dynamic-client-script-for-silverlight-2-beta2.aspx PS. I'm gonna get it updated for SL2Beta2 shortly … ~js From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ivan Porto Carrero Sent: Tuesday, June 10, 2008 2:32 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Dynamic Lanugages in Silverlight 2 Beta 2 Sweet. That means I can compile my dynamic script control for the all the DLR based languages. On Wed, Jun 11, 2008 at 9:29 AM, Ben Hall [EMAIL PROTECTED] wrote: Excellent!! A new set of IronPython, IronRuby and DLR assemblies. I can actually get my app working tonight! Thanks Ben Blog.BenHall.me.uk On Tue, Jun 10, 2008 at 10:08 PM, Jimmy Schementi [EMAIL PROTECTED] wrote: http://blog.jimmy.schementi.com/2008/06/dynamic-languages-in-silverlight-2-beta.html With the announcement of Silverlight 2 Beta 2, the Silverlight Dynamic Languages SDK has been updated as well! Download the Dynamic Languages SDK: http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=14254 There's a lot of new stuff here, from new versions of IronRuby, IronPython, Managed JScript, and the Dynamic Languages Runtime, to more sample. Also, there are now three packages: SDK, SDK Samples, and SDK Source. * SDK: Necessary package to create dynamic language Silverlight applications. * SDK Samples: a bunch of Ruby, Python, and JScript samples. Best bet is to unzip this in the SDK directory. * SDK Source Code: If you want to modify the languages/DLR/Silverlight integration, you can do so here, and build using the given Solution file in Visual Studio. This will create a /bin directory with the identical binaries as the /bin directory in the SDK, however without DLL signing. Enjoy! ~Jimmy ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list
Re: [Ironruby-core] can't require any of the libs
ok thanks that does work. On Thu, Jun 12, 2008 at 12:05 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: We don't do anything auto-magic as far as the path is concerned. I specify the include directories on the command-line by running the now-notorious ir.cmd. My version of the file looks like this: %MERLIN_ROOT%\bin\debug\ir.exe -I %MERLIN_ROOT%\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8;%MERLIN_ROOT%\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8;%MERLIN_ROOT%\Languages\Ruby\Libs %* You'd obviously need to change the paths to suit your file system layout. *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Wednesday, June 11, 2008 5:00 PM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] can't require any of the libs Hi I tried requiring any of the libs that are included in the ironruby source. I tried putting the libs folder in different places but to no avail. So far i've put the libs in. irdir\libs irdir\build\libs irdir\build\debug irdir\build\debug\libs irdir\build\release irdir\build\release\libs where do I have to copy the libs folder to so that IronRuby picks it up? I can require them when i put them in the same folder where I call the ir command. + C:\tools\IronRuby\build\debug » ir IronRuby 1.0.0.0 on .NET 2.0.50727.1434 Copyright (c) Microsoft Corporation. All rights reserved. Note that local variables do not work today in the console. As a workaround, use globals instead (eg $x = 42 instead of x = 42). require 'yaml' = true Somehow this doesn't seem right to me.. but that's probably because I'm putting my stuff in the wrong place. also when I compile with rake compile config=release it will just compile a debug version ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Having difficulties using custom C# dlls with namespaces within IronRuby code
For me that just works with a namespace what I do is I have my assemblies in a folder bin in my application but that could be what ever I call require 'bin/AssemblyName.dll' In that assembly I have a namespace MyNamespace.Model then I can do include MyNamespace::Model if that namespace contains a class called Message I can now use it as message = Message.new message.content = The body of the test message puts message.content I don't know if you know about this but Rails 2.0 has a component ActiveResource which should replace ActiveWebservice. That component allows you to use the resources (if you're using the restful routing that is) you've exposed for your rest application and on the client side you can use that same active resource stuff to create proxies and do queries against that rest service in a fairly nice way. hope this helps Ivan On Fri, Jun 13, 2008 at 12:36 AM, Philippe Monnet [EMAIL PROTECTED] wrote: Now that the Beta 2 of Silverlight provides support for WSI web services, I can now get an all-C# Silverlight app to call Rails (Action Web Service) web services. So I encapsulated my generated web service proxy in its own DLL so I can use it from Ruby, like so: ... require System.ServiceModel require mywebsvcproxy #my DLL ... include System::ServiceModel *include mywebsvcproxyns* ... svcproxy = mywebsvcproxyns::MyRoRServiceReference::MyRorWsPortClient.new() ... etc ... However I keep getting an error as soon as I hit the include for my assembly namespace. I have tried to simplify the issue by creating a very tiny assembly with a C# class with 2 properties and a constructor but I get the same issue. I even tried that from IR with the same results: - the require mywebsvcproxy returns true - if I evaluate mywebsvcproxyns I get undefined The DLL is in the same location as other .rb files in my Silverlight app directory. I have even tried to provide an absolute path in the require statement but that did not make any difference. After putting this email on hold for another check, I found out that as soon as I remove the namespace inside my custom assembly everything works like a charm. I ended up also removing all namespace references in the C# generated proxy and was able to get my IronRuby Silverlight app to successfully invoke my Rails web service. But coming back to the namespace issue, am I missing something basic in how I should be integrating with custom assemblies? Or is this a limitation for the time being? Philippe ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] SVN r114 is out
What could be wrong here? def using(o) begin yield if block_given? ensure o.dispose end end This code worked until rev.113 but now it tells me : $sr = StringReader.new('Hello, world') = #System::IO::StringReader:0x060 $sr.dispose :0:in `Initialize': wrong number or type of arguments for `dispose' (ArgumentError) Thanks Ivan On Fri, Jun 13, 2008 at 2:49 PM, John Lam (IRONRUBY) [EMAIL PROTECTED] wrote: This update contains the code we demo'd at RailsConf, and a few improvements that we've made since then. If you rake compile this build, it will generate an ir.cmd file for you in the build\debug directory. The rakefile now looks for your MRI install (by searching your PATH for ruby.exe). If you have your build\debug directory on your path, this file will run correctly. You will see a bunch of warnings when compiling. We know about these, and will fix them soon (it's the DLR folks deprecating a bunch of old APIs). I've also added a RubyTestKey.snk file which contains a public key. Our assemblies are delay-signed using this key, and you must enable skip verification to run the assemblies on your dev machine. You'll need to run the runfirst.cmd file in svn\trunk to turn on skip verification for assemblies signed using our public key. This should simplify some of the SIGN flag problems, although it introduces a new set of problems around signing if you want to distribute the signed assemblies. Unfortunately, we had to enable signing on external builds because there's some bug that only occurs when running an unsigned build. We're investigating this now. Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] passing a script context around
Hi For the dynamic script control I wrote I want to be able to share the runtime environment that IronRuby has got. Is that possible with the ir command ? My WPF application has got a bunch of assembly references and code files already loaded. It also has some constants defined. Now when I use the dynamic script control I have to reinitialize that whole environment and that is quite costly. It would be nice if I would know how to share variables around and such. It looks like the class that gets me the info I want is RubyExecutionContext :) Thanks Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] How to get to the CLR type
Oh I see.. When I call .to_clr_type on a type that has only been defined in Ruby it returns nil class Testing; end; = nil Testing.to_clr_type = nil Testing.new.get_type = #System::RuntimeType:0x05c On Sat, Jun 14, 2008 at 7:42 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: I'm sure i tried that, but then again I tried many things. and I'm sure I've used that before too when I was playing with LightSpeed... Thanks On Sat, Jun 14, 2008 at 7:20 PM, Tomas Matousek [EMAIL PROTECTED] wrote: require 'mscorlib' = true System::String.to_clr_type = #System::RuntimeType:0x05c Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Friday, June 13, 2008 11:13 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] How to get to the CLR type I hit send to quickly there is more If I do pass it the correct types (which I got from creating instances) @@login_event = EventManager.register_routed_event(login, RoutingStrategy.bubble, RoutedEventHandler.new{}.get_type, LoginControl.new.get_type) then I get a new error RoutedEvent Name 'login' for OwnerType 'Ruby.Classes.UserControl3$3' already used. Which leads me to believe that either I'm doing it wrong or that that's not supposed to happen/supported yet and I have to file a bug report :) Cheers Ivan On Sat, Jun 14, 2008 at 5:57 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: How do I get to the CLR type definition of a class? I assumed that the code below would just work or at least not fail where it did :) @@login_event = EventManager.register_routed_event(login, RoutingStrategy.bubble, RoutedEventHandler, LoginControl) That has IronRuby complaining about the wrong type of arguments and so on. And I figure it's because the register_routed_event method expects a CLR type instead of a DLR one. The only way I know to get to the same information as typeof(RoutedEventHandler) is to create an instance and then calling get_type on it. Is there anoter way for that? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] How to get to the CLR type
Oh ok. So what's the story going to be for XAML then? I wrote an application in WPF but I have to resort to writing quite some bits and pieces in C# because XAML for example don't want to play ball when you create a value converter in ruby not even when defining the interface. class CharRemainingConverter include IValueConverter def convert(value, target_type, parameter, culture) return Constants::CHARACTER_LIMIT - value end def convert_back(value, target_type, parameter, culture) NotImplementedException.new(The method or operation is not implemented.) end end I have a similar experience when it comes to DependencyProperties. I would like to know what that story is going to around these things. Since this applies to both WPF and Silverlight I think everything will work out fine and I am just too soon for this stuff? Many things come to mind to solve the DependencyProperties or the RoutedEvents like an GlobalEventManagerManager ;) and such but unfortunately some of the building blocks (GlobalEventHandlersStore) are internal so I'm pretty sure I shouldn't mess with it if I don't want my stuff to break in the future. There is also an issue with ResourceDictionaries where you can't index into them from IronRuby defining a method in C# that reads the dictionary works just fine. I'm not ranting or complaining.. just sharing my observations :) Cheers Ivan On Sun, Jun 15, 2008 at 5:36 AM, Tomas Matousek [EMAIL PROTECTED] wrote: Ruby classes have no CLR type. The type you're getting by this is shared across multiple Ruby classes. Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Michael Letterle *Sent:* Saturday, June 14, 2008 7:07 AM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] How to get to the CLR type System::Type.get_type_from_handle System::Type.get_type_handle(Test) = #System::RuntimeType:0x05c On Sat, Jun 14, 2008 at 4:11 AM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: Oh I see.. When I call .to_clr_type on a type that has only been defined in Ruby it returns nil class Testing; end; = nil Testing.to_clr_type = nil Testing.new.get_type = #System::RuntimeType:0x05c On Sat, Jun 14, 2008 at 7:42 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: I'm sure i tried that, but then again I tried many things. and I'm sure I've used that before too when I was playing with LightSpeed... Thanks On Sat, Jun 14, 2008 at 7:20 PM, Tomas Matousek [EMAIL PROTECTED] wrote: require 'mscorlib' = true System::String.to_clr_type = #System::RuntimeType:0x05c Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Friday, June 13, 2008 11:13 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] How to get to the CLR type I hit send to quickly there is more If I do pass it the correct types (which I got from creating instances) @@login_event = EventManager.register_routed_event(login, RoutingStrategy.bubble, RoutedEventHandler.new{}.get_type, LoginControl.new.get_type) then I get a new error RoutedEvent Name 'login' for OwnerType 'Ruby.Classes.UserControl3$3' already used. Which leads me to believe that either I'm doing it wrong or that that's not supposed to happen/supported yet and I have to file a bug report :) Cheers Ivan On Sat, Jun 14, 2008 at 5:57 PM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: How do I get to the CLR type definition of a class? I assumed that the code below would just work or at least not fail where it did :) @@login_event = EventManager.register_routed_event(login, RoutingStrategy.bubble, RoutedEventHandler, LoginControl) That has IronRuby complaining about the wrong type of arguments and so on. And I figure it's because the register_routed_event method expects a CLR type instead of a DLR one. The only way I know to get to the same information as typeof(RoutedEventHandler) is to create an instance and then calling get_type on it. Is there anoter way for that? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IIS Deployment
I think august is cutting it a little close. I have no idea how much time you've already spent on it, so dunno if a rewrite in a diff technology is the way to go. And you can deploy RoR to IIS. If you want I can send you a white paper. THe idea is that you forward all the requests to a mongrel. I haven't had much luck with the FastCGI that the IIS team provides. It just doesn't want to do it for me. But using mongrels/thin does work for me. When IronRuby then comes into its own you can always switch to run that app on IronRuby \ my 2c. Cheers Ivan On Fri, Jun 20, 2008 at 8:49 AM, Josh Charles [EMAIL PROTECTED] wrote: Hello All, I have a Ruby on Rails codebase that is only partially completed. Due to circumstances beyond my control, the production server must be IIS, and there is absolutely no way to change this. Deployment is currently due in mid August, basically two months away. My question is this. What are the chances the IronRuby project will be ready to handle something like this at that point in time? Should I basically take what we have and rewrite it in something like ASP.NET MVC? I've spent sometime working and thinking about ways to make this happen. My approach, which is probably terrible, was to take the Web.Routing assembly in a regular ASP.NET application, create a catch-all route and pass all the information to the dispatch.rb file. Granted, I haven't actually got this to work, and this is probably a horrible way to do this. In any case, with deployment two months away, I need to make the decision now to stick with Rails, or make the switch over... Sincerely, Josh ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] YAML
Hi Is yaml supposed to be working atm because when I try it, it definitely does some weird things. When I run the tests there is one test that fails the yamlorg_refcard.yml. And this is my test. require 'yaml' = true $t = {:one = one val, :two = { :nested_first = nested val } } = {:one=one val, :two={:nested_first=nested val}} $y = YAML::dump $t = \n--- !ruby/object:Hash\n!ruby/object:Symbol :one: !ruby/object:String one val\n!ruby/object:Symbol :two: !ruby/obje ct:Hash\n !ruby/object:Symbol :nested_first: !ruby/object:String nested val\n $r = YAML::load $y = #Ruby::StandardLibrary::Yaml::PrivateType:0x05c $r == $t = false $r[:one] :0:in `Initialize': undefined local variable or method `[]' for #Ruby::StandardLibrary::Yaml::PrivateType:0x05c:Ru by::StandardLibrary::Yaml::PrivateType (NoMethodError) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] YAML
You've asked for it :) I'll be on IronRuby from now until sunday so I'll probably be sending a couple more emails over the next couple of days :) On Fri, Jun 20, 2008 at 10:37 AM, Curt Hagenlocher [EMAIL PROTECTED] wrote: YAML support currently does what it needs to do in order to run Rails. Beyond that, all bets are off J. Let the flow of bug reports commence! *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Thursday, June 19, 2008 3:33 PM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] YAML Hi Is yaml supposed to be working atm because when I try it, it definitely does some weird things. When I run the tests there is one test that fails the yamlorg_refcard.yml. And this is my test. require 'yaml' = true $t = {:one = one val, :two = { :nested_first = nested val } } = {:one=one val, :two={:nested_first=nested val}} $y = YAML::dump $t = \n--- !ruby/object:Hash\n!ruby/object:Symbol :one: !ruby/object:String one val\n!ruby/object:Symbol :two: !ruby/obje ct:Hash\n !ruby/object:Symbol :nested_first: !ruby/object:String nested val\n $r = YAML::load $y = #Ruby::StandardLibrary::Yaml::PrivateType:0x05c $r == $t = false $r[:one] :0:in `Initialize': undefined local variable or method `[]' for #Ruby::StandardLibrary::Yaml::PrivateType:0x05c:Ru by::StandardLibrary::Yaml::PrivateType (NoMethodError) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] WPF philosophy
Hi I don't really know if this is an appropriate discussion but here it goes. Ruby and Xaml at first sight a DSL is very appropriate to get rid of the xml syntax. I'm all for that :) However the price you pay is that at that moment only developers can change the design of the application. Blend will happily refuse to load it for example which makes it a bad idea for projects that are developed by a designer and a developer IMHO. What I do see happening is and what I'll use in my chapter is smallish additions, control instantiation and code generation dsl's at functional places in the application. With a DSL you also loose skinning support and the lot. I would be very happy to be proven wrong though :). There are a lot of other places where DSL's really work like setting up timers, threads and those things. Furthermore because xaml controls exist in the statically typed part of the .NET universe it's pretty hard to have controls written in Dynamic languages. I started the Dynamic script control that allows you to inject a DLR based control in a XAML tree. I didn't have time to fully fix it but it does work to a certain degree. One of the problems I have there is that I could not get to the controls inside the dyn script control anymore, the reason is unknown to me at this time. I put that on the back burner for now as I have to make more progress on my book but intend to fully finish that control when my book is finished if nobody else has done one by then or you tell me you will have something like that when IR goes 1.0. I think it would be great to be able to use DLR controls with similar paradigms as their CLR cousins. Then another avenue I've been thinking about is a couple of rake tasks that will take a control tree and spit out the CLR based control with stub event handlers etc so that a designer can still change it but the real implementation of the event handlers occurs in a monkey patched version of that control. This should give you the best of both worlds because you don't need to venture into C# while retaining full tooling support. A downside to this approach is that you will always have a compilation step after you make a change to the design of a control. This is the approach the guys of rucola (a rails like framework for rubycocoa) are taking with interface builder. While blend is no interface builder there are some similarities. A last approach I have in mind but I tend to think that this is a bad one :) A XAML template engine. I think its a bad idea because you lose everything designer support, databinding and dsl niceness. As a conclusion I think I would probably favor a mixture of approach 1-3 with approach 3 being the predominant one and approach 1-2 when needed. Thougths? Thanks Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Announcing IronEditor - An Editor for IronRuby, IronPython and other DLR languages
But that isn't at this time is it? AFAIK mono currently only supports Silverlight 1.0 or am I wrong in my assumption? On Mon, Jul 21, 2008 at 7:17 AM, Stefan Dobrev [EMAIL PROTECTED] wrote: If it is Silverlight API based it should run on Mono as well. 2008/7/21 Oleg Tkachenko [EMAIL PROTECTED]: This is cool! There is definitely a need for a lightweight cross platform IronRuby/IronPython (or even any DLR language) editor. I wish it was based on WPF, but then it won't run on Mono :( Let's coordinate our efforts? -- Oleg -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Ben Hall Sent: Sunday, July 20, 2008 3:07 AM To: ironruby-core@rubyforge.org Subject: [Ironruby-core] Announcing IronEditor - An Editor for IronRuby, IronPython and other DLR languages Hi everyone, Last night I uploaded an initial release of an application I've been working on - IronEditor. This is a simple application designed to make it easier to start coding against the DLR based languages, out of the box it supports IronPython and IronRuby. The reason why I decided to build this is because Visual Studio Integration for the languages is a long way off and playing around creating code to for the languages is painful via the provided console applications. As such, the aim of the application is to provide a very lightweight way to edit and execute code, great while learning the languages and giving demos. Blog Post: http://blog.benhall.me.uk/2008/07/announcing-ironeditor-editor-for.html Download: http://www.codeplex.com/IronEditor Build: 1.0.0.46 This is a release early with not too many advanced features but it can execute code! :) Over the next few weeks and months, I will be adding more features and implementing additional parts of the Hosting API. I will also try to blog about the actual implementation of IronEditor. Any feedback or feature suggestions you have on the application would be great! Thanks Ben Blog.BenHall.me.uk Microsoft MVP (C#) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] inspect in console
Hi, Did the -i switch break on the ir command ? I create a file test.rb with the following content: myvar = hello world puts myvar and then type in ir -i test.rb That yields: (loosely translated I can't find the file .\-i ) mscorlib:0:in `WinIOError': Kan bestand C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby\-i niet vinden . (System::IO::FileNotFoundException) from mscorlib:0:in `Init' from mscorlib:0:in `.ctor' from c:\tools\IronRuby\src\microsoft.scripting.core\PlatformAdaptationLayer.cs:187:in `OpenInputFileStream' from c:\tools\IronRuby\src\microsoft.scripting.core\SourceFileContentProvider.cs:62:in `GetStream' from c:\tools\IronRuby\src\microsoft.scripting.core\SourceFileContentProvider.cs:45:in `GetStream' from c:\tools\IronRuby\src\microsoft.scripting.core\runtime\languageboundtextcontentprovider.cs:38:in `GetReader ' from c:\tools\IronRuby\src\microsoft.scripting.core\sourceunit.cs:102:in `GetReader' from c:\tools\IronRuby\src\microsoft.scripting.core\sourceunit.cs:212:in `Compile' from c:\tools\IronRuby\src\microsoft.scripting.core\sourceunit.cs:246:in `ExecuteProgram' ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Sails, WPF/Silverlight the rails way
Thanks for the tip. I've renamed the project to IronNails on github. 2008/8/2 M. David Peterson [EMAIL PROTECTED] On Sat, 02 Aug 2008 08:00:44 -0600, Charles Oliver Nutter [EMAIL PROTECTED] wrote: FYI, there's already a framework named Sails for Java: http://www.opensails.org/ For the sake of sticking to the Iron theme, why not replace the 'S' with an 'N' and go with IronNails. ;-) Maybed it's just me, but if given the choice, I'd much rather nail it than sail it anyday of the week. :D -- /M:D M. David Peterson Co-Founder Chief Architect, 3rdUrban, LLC Email: [EMAIL PROTECTED] | [EMAIL PROTECTED] Mobile: (206) 999-0588 http://3rdandUrban.com | http://amp.fm | http://www.oreillynet.com/pub/au/2354 | http://news.oreilly.com/m-david-peterson/ ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] check out the following link on IronNails!
I have 14 minutes left ... what to do :) 2008/8/7 Robert Bazinet [EMAIL PROTECTED] Hey, awesome. Ivan is getting famous. -Rob On Thu, Aug 7, 2008 at 5:01 PM, Unnikrishnan Nair [EMAIL PROTECTED]wrote: http://www.infoq.com/news/2008/08/ironnails;jsessionid=67E9C0D196BA7888B1CC719EEB1418B1 InfoQ did an interview with Ivan on his work on IronNails. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby binary disribution
cool thanks Is there a way to inspect interactively after running a script ? I used to use ir -i but -i is used for something differently I've been told last time. And the last question I had is: How do I detach an event handler the equivalent of -= in C#? 2008/8/14 John Lam (IRONRUBY) [EMAIL PROTECTED] Jim Deville: If you're running ir.cmd, it should be including the -I options for you. Not sure if this helps, but ir.cmd has gone away in the r128 build. We are now configuring the relative paths to the different directories via ir.exe.config: configuration appSettings add key=LibPaths value=..\..\lib\IronRuby;..\..\lib\ruby\site_ruby\1.8;..\..\lib\ruby\site_ruby;..\..\lib\ruby\1.8 / /appSettings /configuration Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby binary disribution
Yep I can do require 'foo' but I want to set up a rake task or a script in ironnails that loads the environment but doesn't start the application. So that you can interact with the application. 2008/8/14 Tomas Matousek [EMAIL PROTECTED] Couldn't you run 'require foo' on the interactive command line to achieve the same effect? Events still need some work. Detaching is not supported yet. Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Thursday, August 14, 2008 9:37 AM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] IronRuby binary disribution cool thanks Is there a way to inspect interactively after running a script ? I used to use ir -i but -i is used for something differently I've been told last time. And the last question I had is: How do I detach an event handler the equivalent of -= in C#? 2008/8/14 John Lam (IRONRUBY) [EMAIL PROTECTED] Jim Deville: If you're running ir.cmd, it should be including the -I options for you. Not sure if this helps, but ir.cmd has gone away in the r128 build. We are now configuring the relative paths to the different directories via ir.exe.config: configuration appSettings add key=LibPaths value=..\..\lib\IronRuby;..\..\lib\ruby\site_ruby\1.8;..\..\lib\ruby\site_ruby;..\..\lib\ruby\1.8 / /appSettings /configuration Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby binary disribution
that would be great :D. Thanks 2008/8/14, Tomas Matousek [EMAIL PROTECTED]: Ruby (irb) has –rfile command line option that requires a file before starting repl. Would that work for you? Tomas From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ivan Porto Carrero Sent: Thursday, August 14, 2008 10:34 AM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] IronRuby binary disribution Yep I can do require 'foo' but I want to set up a rake task or a script in ironnails that loads the environment but doesn't start the application. So that you can interact with the application. 2008/8/14 Tomas Matousek [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] Couldn't you run 'require foo' on the interactive command line to achieve the same effect? Events still need some work. Detaching is not supported yet. Tomas From: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] On Behalf Of Ivan Porto Carrero Sent: Thursday, August 14, 2008 9:37 AM To: ironruby-core@rubyforge.orgmailto:ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] IronRuby binary disribution cool thanks Is there a way to inspect interactively after running a script ? I used to use ir -i but -i is used for something differently I've been told last time. And the last question I had is: How do I detach an event handler the equivalent of -= in C#? 2008/8/14 John Lam (IRONRUBY) [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] Jim Deville: If you're running ir.cmd, it should be including the -I options for you. Not sure if this helps, but ir.cmd has gone away in the r128 build. We are now configuring the relative paths to the different directories via ir.exe.config: configuration appSettings add key=LibPaths value=..\..\lib\IronRuby;..\..\lib\ruby\site_ruby\1.8;..\..\lib\ruby\site_ruby;..\..\lib\ruby\1.8 / /appSettings /configuration Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.orgmailto:Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.orgmailto:Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Events?
I actually use a customized version of Observable that includes the sender of the event. It's that approach but a little bit more formalized. It's in the IronNails framework http://github.com/casualjim/ironnails/tree/master/IronNails/vendor/iron_nails/lib/observable.rb That should look a lot like how events are implemented in C#. 2008/8/15 Sean Clark Hess [EMAIL PROTECTED] Cool... that's pretty much what I did. Thanks On Thu, Aug 14, 2008 at 4:08 PM, Tomas Matousek [EMAIL PROTECTED] wrote: It seems that both parts of the code are Ruby. So you should use Ruby language features. It's possible to emulate CLR events by a list of blocks. event = [] # adding a handler: handler = lambda { … } event handler # removing a handler: event.delete handler # firing an event: event.each { |handler| handler[args] } Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Sean Clark Hess *Sent:* Thursday, August 14, 2008 1:29 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] Events? Let's say I create a class called MovieControls, that wraps some existing xaml. The xaml has several buttons, including a toggle play/pause button, and a previous and next button. MovieControls would listen to the click of the play/pause button, and would dispatch a play event when they clicked it to play it, and pause for the opposite. I want to be able to listen to MovieControls to know when to tell my video to play and pause. So, it would be something like this... In MovieControls play_pause_button.click { if (isPlayState) dispatch(play) else dispatch(pause) end } Then, in my app myMovieControls.play { doPlay } myMovieControls.pause { doPause } Does that make more sense now? If this seems totally out of the blue, how are people currently handling abstracting away this kind of functionality? Thanks ~sean On Thu, Aug 14, 2008 at 2:22 PM, Tomas Matousek [EMAIL PROTECTED] wrote: I'm not sure I understand the scenario. Would you like to declare an event on Ruby object that you want to hook from C# code? Like rubyEngine.Operations.GetMember(obj, my_event) += delegate { ...}? Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Sean Clark Hess *Sent:* Thursday, August 14, 2008 12:04 PM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] Events? Hi all, Is there a built-in event system for IronRuby? I know I can handle events with button.click { }, but what if I want to dispatch my own, custom events (from a class I created myself?). I wrote my own event system, but I would prefer to use a built-in dispatch method if it exists. Thanks! ~sean ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Interacting with a WPF/Winforms application
Hi Is there a simple way to interact with the GUI of a WPF/Winforms application? I'll clarify a little what I would like to achieve: when you start a console session with an environment loaded you could potentially type the following lines in there require 'config/boot' start_wpf_application System::Windows::Application.current.main_window.my_panel.children.add Wpf.build(TextBox, :text = Very important placeholder text) That last line would then add a textbox to the panel while the application is running. I could probably use threading to achieve this or different appdomains maybe. any thoughts? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Data Binding?
You can't databind to DLR objects at the moment. You have to define the properties you want to bind to as strong typed classes. The IronNails project I mentioned earlier tries to alleviate all of that :) What you can do is define one class in C# to which you want to bind from within your control/window You can define one property in that C# class something like objects. I made my properties to be from the type ObservableDictionary ie. public class ViewModel : INotifyPropertyChanged { public ObservableDictionarystring, object Objects{ //implement property } //implement class } In IronRuby public MyWindowViewModel ViewModel end You can then bind to values in the dictionary something like vm = MyWindowViewModel.new vm.objects[MyName] = The super important text.to_clr_string view_proxy.data_context = vm.objects window textbox text={Binding [MyName]} / /window or view_proxy.data_context = vm window textbox text={Binding Objects[MyName]} / /window You can index into dictionaries and that way you can get around some of it. But to bind to properties you need to define those classes in C# at the moment unfortunately Hope this helps somewhat Ivan 2008/8/15 Sean Clark Hess [EMAIL PROTECTED] Is it possible to use databinding from within IronRuby? In this case, I want to have a field, @volume on one class, and listen for changes on another class. Thanks ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Latest r134 commit should solve Mono file pathname case sensitivity problem
Works for me after applying the patch for r128 2008/8/19 John Lam (IRONRUBY) [EMAIL PROTECTED] Can folks verify and report back please? Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] sorting of strings is different in IronRuby than in Ruby
Hi I was playing around with a very simple code example and got different results in IronRuby and in Ruby. IronRuby In Action.split(//).sort.uniq.join returns in MRI: AIRbcinortuy returns in IronRuby: AbciInorRtuy I'm sure you guys are aware of this, but just in case :) I guess in the end the 2 results should be the same or is this perhaps something that has to do with encoding? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby on Netbeans
Isn't that just a matter of telling netbeans which ruby interpreter you want to use along with some other parameters. On Fri, Aug 22, 2008 at 1:09 PM, Web Reservoir [EMAIL PROTECTED] wrote: Hello, This is just my suggestion. Netbeans 6.5 shall support (1)Ruby (2) JRuby (3) Python and (4) Php. These are all open source projects(languages) and so is IronRuby. I understand Sun and Microsoft are rivals, but IronRuby is an open source project and i dont see any comeptition in this case. If Sun does not hate PHP, it should not hate IronRuby too. Currently i am working on Ruby On Rails, with JVM and Netbeans 6.1 and Jruby 1.1 on my XP machine and everything seems to be working smoothly. I think rather than waiting for another IDE to emerge, it would be nice if some support for IronRuby is added to Netbeans and let the OSS Community cheerup with IronRuby as the 5th option. Since 4 popular languages are already there i don't see any reason why IronRuby should be neglected. Thanks. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby on Netbeans
Exactly what I was taking about. In netbeans go into Tools - Ruby Platforms . You can't at the moment but when there will be full gem support I don't see how IronRuby couldn't be used with netbeans as is. Netbeans works with ruby but it has no special hooks in ruby or jruby for that matter AFAIK On Fri, Aug 22, 2008 at 2:04 PM, Web Reservoir [EMAIL PROTECTED] wrote: Hello, Let me make it clear... I am talking about IronRuby on Rails on Netbeans. I am not asking Netbeans to support Asp.Net MVC, as some might find confusing. Thanks -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Green paper on IronRuby
Manning just published my green paper on ironruby. http://manning.com/free/green_carrero.html ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Green paper on IronRuby
Dunno ask Manning. Probably the answer will be marketing. It's a white paper AFAICT. and I would like to clarify for those that downloaded the paper there is an error on the first page. The year rails was released this is 2005 and obviously not 1994. It will be changed shortly. On Fri, Aug 22, 2008 at 9:38 PM, Michael Foord [EMAIL PROTECTED]wrote: Why green paper? (Just curious.) Wikipedia has to say of the term: In Britain, other similar Commonwealth jurisdictions (e.g. Australia), and the Republic of Ireland, a *green paper* is a tentative government report of a proposal without any commitment to action; the first step in changing the law. Green papers may result in the production of a white paperhttp://en.wikipedia.org/wiki/White_paper . 2008/8/22 Ivan Porto Carrero [EMAIL PROTECTED] Manning just published my green paper on ironruby. http://manning.com/free/green_carrero.html ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.ironpython.info/ http://www.resolverhacks.net/ ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Looking for Examples
In that case I would be very interested to know how to use rspec or any of the other gems. I tried copying them to the gems folder in the IronRuby install folder but that wasn't it :) I suppose you just took the library and then required the spec file in the lib folder. How are you guys doing on rails support because I think I dragged this wpf chapter out long enough and it's time to start a new one soon. I was thinking rails because I could do my samples for the time being with MRI and choose some rubygems to showcase. And my publisher asked me if the date for januari is still good as a release date :) I have more date questions, do you have an ETA for asp.net asp.net mvc support so I can do some planning around it? I realise I could hack something together myself but if that won't look like the way you are doing it I would have to rewrite too much in my samples probably and it also feels like a waste of time from my part then. I guess that is not something that can be contributed through the community but has to come from MS. Thanks On Wed, Aug 27, 2008 at 6:24 PM, John Lam (IRONRUBY) [EMAIL PROTECTED]wrote: Glen Cooper: Well rspec for one - but I understand it isn't quite ready for IR yet - or vice versa. I've actually gotten rspec to run on IronRuby. But today, our startup time issues (which are being fixed right now) make it a whole less useful than the mspec framework that we're currently using for testing IronRuby. Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Cucumber / RSpec Story Runner
I'll try cucumber tonight when i get home. I'm trying to build a little rails app with rspec etc. What's the status on a .NET based active record adapter? I've been thinking that it might be necessary to write an adapter that creates the correct .NET provider and dispatches the calls through that layer. Either as a part of ruby-dbd or as adapters to ActiveRecord.. dbd gives the advantage that you can use it everywhere then. any thoughts? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Wed, Oct 22, 2008 at 9:56 AM, Ben Hall [EMAIL PROTECTED] wrote: Nice work guys!! Pleased that I won't be having to use a hacked version of r156 :) One of the problems you mentioned (pretty errors due to backtrace) will cause the story runner in 1.1.4 to blow up and throw an exception, but as that is now Cucumber I don't know if we will have the same issues. Have you tried Cucumber yet? Ben On Wed, Oct 22, 2008 at 8:01 AM, John Lam (IRONRUBY) [EMAIL PROTECTED] wrote: -X:Interpret forces execution to always go through the DLR interpreter rather than through the DLR compilation engine. This trades-off faster startup for decreased throughput. We have a number of different strategies that we're exploring to improve things: 1) Ahead of time cached pre-compilation to native x86 via ngen 2) Mixed mode DLR interpreter and DLR compiler. We'll start off interpreting and compile the 'hot' code paths dynamically at runtime. 3) Mixed mode Ruby interpreter and DLR compiler. We can improve perf even more by writing a Ruby specific interpreter and avoiding the tree transform from the Ruby AST to DLR trees for the interpreted code paths. We really haven't done any performance tuning of note on IronRuby so far. We're focusing on getting the language correct; performance will come after we stabilize the language. Thanks, -John -Original Message- From: [EMAIL PROTECTED] [mailto:ironruby-core- [EMAIL PROTECTED] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 11:38 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner I'm not on the same machine as earlier - the previous machine was my work desktop PC running vista This one is running windows XP under vmware on a macbook Running with -X:Interpret I see 0.78 seconds on repeated runs (0.79 on the first) Without it I see 1.95 seconds (2.05 on the first run) I didn't know about -X:Interpret... So what exactly does it do differently, and if it's so much faster, why isn't it the default? On 22/10/2008, at 7:21 PM, John Lam (IRONRUBY) wrote: Great - I have it working now on my machine. I'm seeing 0.45s or so as the net time (excluding startup) for the tests if I run using the -X:Interpret flag. Can you try running with that flag enabled on your machine and let me know how quickly it runs? Thanks, -John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 11:07 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner Sure. Here's the entire contents of the ruby file $LOAD_PATH 'c:/dev/rspec/lib' require 'spec' module ActiveSupport; end # workaround ironruby defined? bug class Vehicle def initialize(people) @people = people end attr_accessor :people end describe Vehicle do it should assign people using the constructor do car = Vehicle.new(['orion', 'john', 'jim']) car.should have(3).people end end Note I'm not using gems or anything else like that. To replicate this you'd basically do this: svn checkout ironruby 168 into c:\dev\ironruby rake compile git clone rspec straight from github, and stick it in c:\dev\rspec edit c:\dev\rspec\lib\spec\extensions\main.rb and fix the call to File.expand_path spin up a command prompt and set PATH=blahblah so it can see the ironruby binaries that got build previously ir rspectest.rb On 22/10/2008, at 6:40 PM, John Lam (IRONRUBY) wrote: Orion - can you supply us with your rspectest.rb file? I was just hacking around with rspec 1.1.9 here, and it's blowing up with a bunch of dependencies on startup. Thanks, -John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Orion Edwards Sent: Tuesday, October 21, 2008 7:37 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Cucumber / RSpec Story Runner The nested defined? bug is logged here: http://rubyforge.org
Re: [Ironruby-core] IronRuby Compiles Broken?
I got the same errors yesterday. I could build it using visual studio though. Mine was on vista 32-bit in both powershell and command On Thu, Oct 23, 2008 at 6:31 PM, Ted Milker [EMAIL PROTECTED] wrote: Is the IronRuby tree currently broken for compiles? I have tried everything I can think of to get it to build and I just get: Setting environment for using Microsoft Visual Studio 2008 x86 tools. c:\Users\ted\Desktop\IronRubyrake compile (in c:/Users/ted/Desktop/IronRuby) Read in 17 resources from c:\users\ted\desktop\ironruby\src\microsoft.scripting \math\MathResources.resx Writing resource file... Done. The command line is too long. rake aborted! Command failed with status (1): [csc /out:c:\users\ted\desktop\ironruby\bu...] c:/Users/ted/Desktop/IronRuby/rakefile:284 (See full trace by running task with --trace) c:\Users\ted\Desktop\IronRuby I am running on Vista Ultimate 64bit with Visual Studio 2008 Professional. I have tried both the 32bit and 64bit command line shortcuts and I just cannot get past The command line is too long. I cannot even figure out which command line is too long. I have tried on two different machines(both Vista Ultimate 64bit) with the same results. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby Compiles Broken?
Great to hear somebody is reading it :) Thanks I'll add it to the first chapter that you can also build it using visual studio. I guess by the time ironruby releases I'll just replace that section with a how to download the binaries ;) On Thu, Oct 23, 2008 at 7:33 PM, Ted Milker [EMAIL PROTECTED] wrote: On Thu, Oct 23, 2008 at 11:49 AM, Ivan Porto Carrero [EMAIL PROTECTED] wrote: I got the same errors yesterday. I could build it using visual studio though. Mine was on vista 32-bit in both powershell and command Wow, I sure was overlooking the obvious. I have been fighting this since the weekend, trying to figure out what was wrong. I was reading your book and have been trying to build with your instructions in the first chapter and I totally missed the solution file. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] SVN r169 is out
Hi Ben I had trouble but you can try to write your code like this require 'rubygems' gem 'spec' that should work.. that's how i have to require rails --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Tue, Nov 4, 2008 at 11:16 PM, Ben Hall [EMAIL PROTECTED] wrote: Hi John, I feel we might be talking about different things. I've got my GEM_PATH variable set. C:\Program Files\Microsoft Visual Studio 9.0\VCecho %GEM_PATH% C:\ruby\lib\ruby\gems\1.8 When I try and access the gem, it fails - I expected this to work but feel this is where I might have misunderstood. E:\IronRuby\r169\build\debugir require 'rubygems' = true require 'spec' e:\IronRuby\r169\src\IronRuby.Libraries\Builtins\kernelops.cs:400:in `require': no such file to load -- spec (LoadError) from custom_require.rb:26:in `require' from :0 The only way I have got this to work is to set the lib path to the spec.rb file for LibraryPaths in the ir.config. Should this have worked? Thanks Ben On Tue, Nov 4, 2008 at 9:57 PM, John Lam (IRONRUBY) [EMAIL PROTECTED] wrote: You can set GEM_PATH environment variable in your user profile to point to your mri\lib\ruby\gems\1.8 directory. This works fine on my machine here. Curt just got gem install working (modulo rdoc binary regex strangeness) here, so we're really close to gem install working. Thanks, -John -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Ben Hall Sent: Tuesday, November 04, 2008 12:59 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] SVN r169 is out Hi John, I thought you mentioned previously on the list that the MRI gems will be used for the time being, I just tried and it doesn't seem to be picking them up. Is there anything extra I have to do? I was hoping I would just be able to do a require on the gem Ben On Tue, Nov 4, 2008 at 5:45 PM, John Lam (IRONRUBY) [EMAIL PROTECTED] wrote: rake compile is still busted due to command line overflow. Will fix this sometime after RubyConf J Thanks, -John ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Silverlight (sdlsdk) on mac
I have both .. the one i installed from the installer exactly the link you gave me Jimmy :) But I also built it from svn in an attempt to make it work. AFAICT zlib is properly linked, it is advertised somewhere during the build process. Ok I will submit a bug report to mono.. Thanks Ivan On Fri, Dec 5, 2008 at 6:54 PM, Jimmy Schementi [EMAIL PROTECTED] wrote: Seo Sanghyeon wrote: 2008/12/6 Ivan Porto Carrero [EMAIL PROTECTED]: Hi When I want to look at some samples on the mac side of my laptop from the sdlsdk I get an error from mono [snip] 17:10:27 500 673 /samples/ruby/clock/app.xap [error generating XAP: libMonoPosixHelper.dylib] I am using the mono 2.0.1 tarball but I get the same problem with trunk. On windows it works when I use mono. Do I submit a bug for that with the mono team? This sounds like something similar to http://bugs.debian.org/388369. Did you compile Mono yourself? If so, make sure zlib is found. If this is a binary package, packaging bug is in order. On Mac I test with the Mono Mac installer ( http://ftp.novell.com/pub/mono/archive/2.0.1/macos-10-universal/1/MonoFramework-2.0.1_1.macos10.novell.universal.dmg), and that has always worked. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Silverlight (sdlsdk) on mac
I had a mono installed with ports too that was the culprit. On Fri, Dec 5, 2008 at 7:26 PM, Ivan Porto Carrero [EMAIL PROTECTED]wrote: I have both .. the one i installed from the installer exactly the link you gave me Jimmy :) But I also built it from svn in an attempt to make it work. AFAICT zlib is properly linked, it is advertised somewhere during the build process. Ok I will submit a bug report to mono.. Thanks Ivan On Fri, Dec 5, 2008 at 6:54 PM, Jimmy Schementi [EMAIL PROTECTED] wrote: Seo Sanghyeon wrote: 2008/12/6 Ivan Porto Carrero [EMAIL PROTECTED]: Hi When I want to look at some samples on the mac side of my laptop from the sdlsdk I get an error from mono [snip] 17:10:27 500 673 /samples/ruby/clock/app.xap [error generating XAP: libMonoPosixHelper.dylib] I am using the mono 2.0.1 tarball but I get the same problem with trunk. On windows it works when I use mono. Do I submit a bug for that with the mono team? This sounds like something similar to http://bugs.debian.org/388369. Did you compile Mono yourself? If so, make sure zlib is found. If this is a binary package, packaging bug is in order. On Mac I test with the Mono Mac installer ( http://ftp.novell.com/pub/mono/archive/2.0.1/macos-10-universal/1/MonoFramework-2.0.1_1.macos10.novell.universal.dmg), and that has always worked. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] New revisions
For me it works when I set the merlin root environment variable and fixed the rake file.Were you able to build ironruby from svn before ? It might be that csc.exe (%WINDIR%\Microsoft.NET\v3.5.\) is not in your path. I've had that before On Sat, Dec 6, 2008 at 12:35 PM, Jim Deville [EMAIL PROTECTED] wrote: I think the listserv ate my mail. It will show up later, but I wanted to try and help. Can you send me the output of git diff? Thanks, JD *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Terence Lewis *Sent:* Saturday, December 06, 2008 3:08 AM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] New revisions Still not working, but a little better: D:\Projects\OpenSource\ironruby\ironruby\merlin\main\Languages\Rubyrake compile --trace (in D:/Projects/OpenSource/ironruby/ironruby/merlin/main/Languages/Ruby) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke clean_build (first_time) ** Invoke happy ** Execute clean_build ** Invoke compile_dlr (first_time) ** Invoke compile_extension_attributes (first_time) ** Invoke clean_build ** Execute compile_extension_attributes --- dlr_core --- rake aborted! wrong number of arguments (1 for 0) ./context.rb:508:in `collect' ./context.rb:508:in `get_compile_path_list' ./context.rb:540:in `compile' ./context.rb:522:in `chdir' ./context.rb:522:in `compile' D:/Projects/OpenSource/ironruby/ironruby/merlin/main/Languages/Ruby/rake/compile.rake:28 ./context.rb:702:in `instance_eval' ./context.rb:702:in `source_context' D:/Projects/OpenSource/ironruby/ironruby/merlin/main/Languages/Ruby/rake/compile.rake:27 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:238:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:238:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:238:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 c:/ruby/bin/rake.bat:25:in `load' c:/ruby/bin/rake.bat:25 On Sat, Dec 6, 2008 at 1:00 PM, Jim Deville [EMAIL PROTECTED] wrote: Hm… That one needs to be fixed. For now, you can modify merlin/main/languages/ruby/rake/misc.rake. Remove the check for tf.exe from the happy task. I'll work on a change for that. JD *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Terence Lewis *Sent:* Saturday, December 06, 2008 2:45 AM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] New revisions Thanks for the speedy reply Jim. After setting up MERLIN_ROOT, I then get: (in D:/Projects/OpenSource/ironruby/ironruby/merlin/main/Languages/Ruby) Cannot find tf.exe on system path. * Missing commands! You must have the .NET redist and the SDK * (for resgen.exe) installed. If you are synchronizing source *
Re: [Ironruby-core] Handling C# lower case namespaces
I get the same behavior. I can load types from the CLR but not from my own assembly. I copied my assembly into the folder that contains ir.exe require 'mscorlib' = true require 'IronNails.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' = true IronNails::View::XamlProxy = IronNails::View::XamlProxy System::Type.get_type 'IronNails.View.XamlProxy' = nil System::Type.get_type 'System.String' = #System::RuntimeType:0x05c IronNails::View::XamlProxy.to_clr_type = #System::RuntimeType:0x05e On Mon, Dec 8, 2008 at 5:54 PM, Aaron Feng [EMAIL PROTECTED] wrote: Tomas, I tried it again. I couldn't get the following to work with my own DLL even If I capitalize the namespace (It does work fine with build in types like System.String): System::Type.get_type(Abc.Hi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) Do I have any other options? Thanks, Aaron ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Handling C# lower case namespaces
Yes that works On Mon, Dec 8, 2008 at 8:11 PM, Tomas Matousek [EMAIL PROTECTED] wrote: Can you load the assembly and get the type explicitly? require 'mscorlib' System::Reflection::Assembly.Load(IronNails.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null).GetType('IronNails.View.XamlProxy') Tomas *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ivan Porto Carrero *Sent:* Monday, December 08, 2008 9:46 AM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] Handling C# lower case namespaces I get the same behavior. I can load types from the CLR but not from my own assembly. I copied my assembly into the folder that contains ir.exe require 'mscorlib' = true require 'IronNails.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' = true IronNails::View::XamlProxy = IronNails::View::XamlProxy System::Type.get_type 'IronNails.View.XamlProxy' = nil System::Type.get_type 'System.String' = #System::RuntimeType:0x05c IronNails::View::XamlProxy.to_clr_type = #System::RuntimeType:0x05e On Mon, Dec 8, 2008 at 5:54 PM, Aaron Feng [EMAIL PROTECTED] wrote: Tomas, I tried it again. I couldn't get the following to work with my own DLL even If I capitalize the namespace (It does work fine with build in types like System.String): System::Type.get_type(Abc.Hi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) Do I have any other options? Thanks, Aaron ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] dbd implementation for ado.net
Hi I've created an ADO.NET implementation for DBI but I may have overlooked some stuff. At the moment it's living on google code http://code.google.com/p/ironruby-dbi There is an extra colon in the connection string required to make it select the correct data provider. DBI.connect(DBI:ADONET*:MSSQL*:Data Source=(local);initial catalog=mydb;user id=sa;password=topsecret) Feel free to test and tell me what's wrong with it :) I've only tested it against SQL Server.. This should make implementing the activerecord adapters for rails a little bit easier because in many cases it's just a matter of changing the connection string of an existing adapter (at least that's what I'm hoping for). Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Need help building IronRuby on Mono 2 + OS X
I've tried to build from source on OSX too.. with the latest trunk from mono but it won't compile I get the same error. to make the Rakefile work I had to make 2 minor changes. In Rakefile I had to change the paths to the other rake files from \ to / In rake/misc.rake I had to change line 107 to: commands += (!mono? ? ['svn.exe'] : ['svn'] ) if IronRuby.is_merlin? » rake compile mono=1 --trace (in /Users/ivan/src/ironruby/merlin/main/Languages/Ruby) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy ** Invoke clean_build (first_time) ** Invoke happy ** Execute clean_build ** Invoke compile_dlr (first_time) ** Invoke compile_extension_attributes (first_time) ** Invoke clean_build ** Execute compile_extension_attributes --- dlr_core --- ** Execute compile_dlr --- dlr_core --- Exception caught by the compiler while compiling: Block that caused the problem begin at: Ast/LambdaExpression.cs(121,38): Block being compiled: [Ast/LambdaExpression.cs(121,72):,Ast/LambdaExpression.cs(123,9):] System.NullReferenceException: Object reference not set to an instance of an object Internal compiler error at Ast/LambdaExpression.cs(121,38):: exception caught while emitting MethodBuilder [Expression`1::Accept] Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at Mono.CSharp.TypeInferenceContext.FixIndependentTypeArguments (System.Type[] methodParameters, System.Boolean fixed_any) [0x0] at Mono.CSharp.TypeInferenceV3.InferInPhases (Mono.CSharp.EmitContext ec, Mono.CSharp.TypeInferenceContext tic, Mono.CSharp.AParametersCollection methodParameters) [0x0] at Mono.CSharp.TypeInferenceV3.InferMethodArguments (Mono.CSharp.EmitContext ec, System.Reflection.MethodBase method) [0x0] at Mono.CSharp.TypeManager.InferTypeArguments (Mono.CSharp.EmitContext ec, System.Collections.ArrayList arguments, System.Reflection.MethodBase method) [0x0] at Mono.CSharp.MethodGroupExpr.IsApplicable (Mono.CSharp.EmitContext ec, System.Collections.ArrayList arguments, Int32 arg_count, System.Reflection.MethodBase method, System.Boolean params_expanded_form) [0x0] at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.EmitContext ec, System.Collections.ArrayList Arguments, Boolean may_fail, Location loc) [0x0] at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec, ResolveFlags flags) [0x0] at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Return.DoResolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.ExitStatement.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.ExplicitBlock.Resolve (Mono.CSharp.EmitContext ec) [0x0] at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters ip, IMethodData md, System.Boolean unreachable) [0x0] rake aborted! Command failed with status (1): [gmcs /noconfig @/var/folders/-x/-xQjxc2kHg...] /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:971:in `sh' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:984:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:984:in `sh' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1072:in `sh' ./context.rb:256:in `exec' ./context.rb:554:in `compile' ./context.rb:531:in `chdir' ./context.rb:531:in `compile' /Users/ivan/src/ironruby/merlin/main/Languages/Ruby/rake/compile.rake:35 ./context.rb:711:in `instance_eval' ./context.rb:711:in `source_context' /Users/ivan/src/ironruby/merlin/main/Languages/Ruby/rake/compile.rake:34 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain' /opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
Re: [Ironruby-core] Need help building IronRuby on Mono 2 + OS X
Ok now that I know what that error message means i went ahead and forked ironruby also. I created a branch called mono and it builds successfully on my mac with mono. I basically applied many of the fixes from seo's patch but for the git layout and with the sources from 18/12/2008. I think you also have to set the MERLIN_ROOT environment variable if you're using the git layout. I use a .bashrc file and there I added the line export MERLIN_ROOT='/Users/ivan/src/ironruby/merlin/main' To get ironruby from my fork and compile it: git clone git://github.com/casualjim/ironruby.git cd ironruby git checkout -b mono git pull origin mono cd merlin/main/Languages/Ruby rake compile mono=1 I tried using Michael's branch but it didn't want to work for me. Thanks Seo, Michael :) On Tue, Dec 30, 2008 at 1:04 PM, Seo Sanghyeon sanx...@gmail.com wrote: 2008/12/30 Ivan Porto Carrero i...@flanders.co.nz: I've tried to build from source on OSX too.. with the latest trunk from mono but it won't compile I get the same error. Try the latest patch on http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/http://sparcs.kaist.ac.kr/%7Etinuviel/download/IronRuby/ (Or equivalently, Michael Letterle's git tree on github) -- Seo Sanghyeon ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] problems with gems
Hi I tried to install the rails gem using igem. Is that supposed to work? » igem install rails ERROR: Error installing rails: attempt to install file into test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~ under ools/ironruby/merlin/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/actionmailer-2.2.2 I then tried to install them one by one with --ignore-dependencies » igem install --ignore-dependencies --verbose activesupport-2.2.2.gem Installing gem actionmailer-2.2.2 Using local gem C:/tools/ironruby/merlin/main/Languages/Ruby/libs/../../../../External/languages/ruby/ruby-1.8.6// onruby/gems/1.8/cache/actionmailer-2.2.2.gem ERROR: While executing gem ... (NoMethodError) undefined method `include?' for nil:NilClass When I copied the gem files, cache and specifications over from MRI they list properly but when I try to generate an application skeleton it seems like something is wrong in the way it handles the paths. » irails test_irails c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs:390:in `require': no such fi le to load -- C:/tools/ironruby/merlin/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/-2.2.2/bin/../lib/r uby_version_check (LoadError) from custom_require.rb:26:in `require' from :0 from c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs:374:in `load' from :0 I had a similar thing happen to me when I tried to install rake but then it created a folder -0.8.3 instead of rake-0.8.3 after some tinkering i did get rake working but rails doesn't seem to be really happy atm. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Xml Processing in IronRuby - Help me improve the wrapper
I wrote something similar a while ago http://github.com/casualjim/ironnails/tree/master/IronNails/vendor/iron_nails/lib/iron_xml.rb statuses = [] IronXml.parse('friends_timeline.xml', :document) do |doc| doc.elements('statuses') do |status| st = Status.new st.id = status.element('id').value st.created_at = status.element('created_at').value st.text = status.element('text').value st.source = status.element('source').value st.truncated = status.element('truncated').value st.in_reply_to_status_id = status.element('in_reply_to_status_id').value st.in_reply_to_user_id = status.element('in_reply_to_user_id').value st.favorited = status.element('favorited').value status.elements('user') do |user| # process user here end statuses st end end or statuses = [] IronXml.parse('friends_timeline.xml', :document) do |doc| doc.statuses do |status| st = Status.new st.id = status.id st.created_at = status.created_at st.text = status.text st.source = status.source st.truncated = status.truncated st.in_reply_to_status_id = status.in_reply_to_status_id st.in_reply_to_user_id = status.in_reply_to_user_id st.favorited = status.favorited status.user do |user| # process user here end statuses st end end You can maybe look there for inspiration :) On Thu, Jan 1, 2009 at 6:48 PM, Ben Hall ben200...@googlemail.com wrote: Hello, I've just been playing around with IronRuby and processing some XML from a REST service. I've created this wrapper: require 'mscorlib' require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' include System require 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' include System::Xml #Wrapper around .Net XMLDocument to make it easier to query with - more like REXML class Document def initialize(xml) @document = XmlDocument.new @document.load_xml xml end def get(xpath) #.collect - I want to pass the block in, not have to use it on the outside. @document.SelectNodes(xpath) end end class XmlNodeList def get(name) list.select {|e| e.Name == name} end end class XmlElement def get(name) if has_attribute name get_attribute name else get_elements_by_tag_name name end end def text inner_text end end My first problem is that I'm getting XmlElement object instead of XmlNode from an XmlNodeList. If I had XmlNode, then I could do e['n'].text - which is what I want. As a result, my code to access the N element looks like this: require 'xml' @document = Document.new('xx1ntest/nzaaa/z/x1/x') @document.get('x').collect {|n| puts n.text} testaaa @document.get('x/x1').collect {|e| e.get('n').collect {|n| puts n.text}} test Why am I getting a XmlElement object? How can I access my xml in a cleaner fashion? My second problem, I wanted to be able to pass in a block def get(xpath) @document.SelectNodes(xpath).collect {yield} end In this case, I get the following error: @document.get('x') {|n| puts n.text} :1: undefined method `text' for nil:NilClass (NoMethodError) from xml.rb:27:in `get' I changed it to {|n| yield}, but I get the same error. The object is always nil. What am I doing wrong? Hope this all makes sense. Thanks Ben ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] ASP.NET integration ?
As my chapter on Rails is coming to an end I'd like to find out how things are going for ASP.NET webforms or asp.net MVC integration. Do you guys have an idea as to when we could expect something like this? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] more gem trouble but different now
Hi I got the latest svn revision for ironruby (r. 182). I tried upgrading rubygems to version 1.3.1 (rails 2.2.2 needs it) And it has a similar problem with the path name. it fails with a directory not found exception because it created a folder structure like this for generating the bin folder C:\External\languages\ruby\ruby-1.8.6\lib\ironruby\s\1.8\s\rubys-update-1.3.1 While the correct path should be. C:\External\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8\gems\rubygems-update-1.3.1 Below you can find what I submitted as a bug report to install the rails gem. + C:\tools\ironruby » igem install rake --verbose --debug HEAD 200 OK: http://gems.rubyforge.org/latest_specs.4.8 GET 200 OK: http://gems.rubyforge.org/quick/Marshal.4.8/rake-0.8.3.gemspec.rz ERROR: While executing gem ... (TypeError) allocator undefined for Zlib::Inflate c:\tools\ironruby\src\IronRuby.Libraries\zlib\zlib.cs:517:in `inflate' rubygems.rb:395:in `inflate' spec_fetcher.rb:77:in `fetch_spec' spec_fetcher.rb:64:in `fetch' c:\tools\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in `each' c:\tools\ironruby\src\IronRuby.Libraries\Builtins\Enumerable.cs:88:in `map' spec_fetcher.rb:61:in `fetch' dependency_installer.rb:75:in `find_gems_with_sources' dependency_installer.rb:162:in `find_spec_by_name_and_version' dependency_installer.rb:206:in `install' install_command.rb:70:in `execute' c:\tools\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in `each' install_command.rb:45:in `execute' command.rb:129:in `invoke' command_manager.rb:86:in `process_args' command_manager.rb:74:in `run' gem_runner.rb:25:in `run' :0 When I try to install rake remotely obviously it fails. But I then took the .gem files for rake and rails and proceeded with: igem install --debug --local rails-2.2.2.gem When they mean verbose they actually mean it ;) The first time I executed the command it wasn't happy halfway through the install process of rake; failing with a DirectoryNotFound exception. It fails because it is looking for a bin folder that should have been created in gems/rake-0.8.3/ folder but instead it gets created in a gems/-0.8.3 folder. Somehow it forgets which gem it is installing when it is creating the folder. The error » igem install --debug --local --verbose rails-2.2.2.gem Installing gem rake-0.8.3 Using local gem C:/tools/ironruby/lib/IronRuby/../../../../External/languages/ruby/ruby-1.8.6//lib/ironruby/gems/1.8/cache/rake-0.8.3.gem C:/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/rake-0.8.3/install.rb C:/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/rake-0.8.3/CHANGES C:/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/rake-0.8.3/MIT-LICENSE C:/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/rake-0.8.3/Rakefile C:/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/rake-0.8.3/README C:/External/languages/ruby/ruby-1.8.6/lib/ironruby/gems/1.8/gems/rake-0.8.3/TODO ERROR: While executing gem ... (System::IO::DirectoryNotFoundException) Could not find a part of the path 'C:\External\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8\gems\rake-0.8.3\bin\rake'. mscorlib:0:in `WinIOError' mscorlib:0:in `Init' mscorlib:0:in `.ctor' c:\tools\ironruby\src\IronRuby.Libraries\Builtins\FileOps.cs:402:in `open' installer.rb:443:in `extract_files' c:\tools\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in `each' installer.rb:438:in `extract_files' installer.rb:104:in `install' dependency_installer.rb:217:in `install' c:\tools\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in `each' dependency_installer.rb:206:in `install' install_command.rb:70:in `execute' c:\tools\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in `each' install_command.rb:45:in `execute' command.rb:129:in `invoke' command_manager.rb:86:in `process_args' command_manager.rb:74:in `run' gem_runner.rb:25:in `run' :0 This is fine.. I create a bin folder in the rake-0.8.3 folder and proceed with: igem install --debug --local rake-0.8.3.gem That actually installs the gem but fails during the rdoc generation. ERROR: While executing gem ... (TypeError) can't convert Array into String c:\tools\ironruby\src\IronRuby.Libraries\Builtins\FileOps.cs:288:in `join' html_generator.rb:612:in `http_url' html_generator.rb:590:in `initialize' html_generator.rb:1264:in `build_class_list' html_generator.rb:1259:in `build_indices' c:\tools\ironruby\src\IronRuby.Libraries\Extensions\IListOps.cs:700:in `each' html_generator.rb:1253:in `build_indices' html_generator.rb:1189:in `generate' rdoc.rb:249:in `document' doc_manager.rb:99:in `run_rdoc'
Re: [Ironruby-core] Enumerate CLR methods
instance.class.to_clr_type.get_methods.collect { |m| m.name.to_s }.uniq.sort.each { |m| p m } or Form.to_clr_type.get_methods.collect { |m| m.name.to_s }.uniq.sort.each { |m| p m } On Thu, Jan 8, 2009 at 1:36 AM, Alex 2k8 li...@ruby-forum.com wrote: Hello, How to enumerate the CLR object methods? I whould like to write some thing like this: - - - require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' include System::Windows::Forms p Form.new.methods.sort - - - and to see methods like: show, show_dialog, ... - Alex -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] require my assembly
For me it works with a path too http://code.google.com/p/ironruby-dbi/source/browse/trunk/src/ironruby-dbi/dbd-adonet/ADONET.rb But I do use forward slashes It does have some weirdness though, because sometimes I have to actually copy the assembly to the directory where ir.exe lives. I'm not sure as to when exactly that needs to happen. On Thu, Jan 8, 2009 at 7:51 PM, Michael Letterle michael.lette...@gmail.com wrote: currently, you have to copy MyApp.Core.dll to the location where ir.exe is located. On Thu, Jan 8, 2009 at 1:46 PM, Sam Malone li...@ruby-forum.com wrote: Hi, I'm new to IronRuby. I'm trying to require a .net assembly but I have the following error message. Any help will be very much appreciated. Note : -- MyApp.Application.dll references MyApp.Core.dll and both are in the same folder C:\MyApp\Trunk\Bin\ Code : -- require 'C:\MyApp\Trunk\Bin\MyApp.Application.dll' include MyApp::Application def main print ZlibCompression.Decompress(ZlibCompression.Compress(toto)) end if __FILE__ == $0 main() end Error message: -- Unhandled exception: mscorlib:0:in `ResolveType': Could not load file or assembly 'MyApp.Core, Version=1.0.278.0, Culture=neutral, Public KeyToken=null' or one of its dependencies. The system cannot find the file specified. (System::IO::FileNotFoundException ) from mscorlib:0:in `ResolveTypeHandle' -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Michael Letterle [Polymath Prokrammer] http://blog.prokrams.com ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Zlib::Inflate error when installing gems
I think you are aware of the error.. but I'd like to mention on the list that you can get around it by first installing the gem in MRI that seems to make it go away. » igem install bacon ERROR: While executing gem ... (TypeError) allocator undefined for Zlib::Inflate + C:\Users\Ivan Porto Carrero » gem install bacon Successfully installed bacon-1.1.0 1 gem installed Installing ri documentation for bacon-1.1.0... Installing RDoc documentation for bacon-1.1.0... + C:\Users\Ivan Porto Carrero » igem install bacon Successfully installed bacon-1.1.0 1 gem installed Installing ri documentation for bacon-1.1.0... Installing RDoc documentation for bacon-1.1.0... ERROR: While executing gem ... (TypeError) can't convert Array into String To install the rails gem there is only one issue remaining and that has to do with a file in the actionmailer test fixtures. The name of the file ends in a ~ and apparently ironruby doesn't like that. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IronRuby with Asp.Net MVC is possible or not...?
I definitely want to help with the integration of mvc and IronRuby. But I was also waiting for it to go to 1.0 before actually spending a serious amount of time on it. On Wed, Jan 28, 2009 at 8:31 AM, Jimmy Schementi jimmy.scheme...@microsoft.com wrote: == Short Answer http://blog.jimmy.schementi.com/2008/09/aspnet-dynamic-language-support.html http://github.com/jschementi/ironrubymvc We've always been clear on an expected 1.0 date ... sometime in 2009. =) The schedule to 1.0 will be more apparent in the next coming months. Check out http://ironruby.net, lots of new information about the project up there, and like I said, more to come. IronRuby is open-source. ASP.NET http://asp.net/ MVC source-code is available. If you want it to work so badly, why not work on it yourself? The source code for the initial integration is available too, so I don't see the problem. We're a small team, so we can only focus on the language, and could use the help with these types of integration projects. So, please help! == Long Answer IronRuby has a very small, full-time development team at Microsoft. We are focusing on the language and libraries, full-time; IronRuby 1.0 is our priority. Other integration with .NET frameworks is usually from broader DLR-integration efforts that IronRuby gets for free/minimal effort, like my work on Silverlight before working on IronRuby. So, again, we're the IronRuby team working on the Ruby language. If you'd like to voice your opinion about integration with ASP.NEThttp://asp.net/MVC, I'm sure the ASP.NET http://asp.net/ MVC team would want to hear. That being said, I've been the person on working most closely with the ASP.NET http://asp.net/ team, only on my free time, to make steps towards a better DLR integration with ASP.NET http://asp.net/. Cause I care =P And in late September we made a first step by releasing an updated integration between IronPython and ASP.NET http://asp.net/. http://blog.jimmy.schementi.com/2008/09/aspnet-dynamic-language-support.html. Also, Phil Haack and I have been working on an IronRuby MVC integration http://github.com/jschementi/ironrubymvc. Phil was last working on filters, but we haven't merged that code back into my github account. The current state of the repo may be a little wacky, since the sample app uses ActiveSupport, which loads way too slowly, but it works. Phil and I are only two people. With other full-time job responsibilities, and other side projects. If anyone is interested in seeing ASP.NEThttp://asp.net/(MVC) integration, please feel free to get the available code and start building upon it. If you want to contribute, we can move the projects to ironruby-contrib and gladly accept patches. If no one helps us with this, things will move slow ... it will eventually happen, but slow. So, if you want it so badly, I encourage you to prove it and help. If you don't, and the IronRuby team has to do the work, then 1.0 will be that much further away. ~Jimmy -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core- boun...@rubyforge.org] On Behalf Of Web Reservoir Sent: Tuesday, January 27, 2009 8:17 PM To: ironruby-core@rubyforge.org Subject: [Ironruby-core] IronRuby with Asp.Net MVC is possible or not...? Hello.. --- -- Hi Phil, Great News shared. I am dying to work with IronRuby and Asp.Net MVC since ages, but no good news are seen nearby. Can you kindly make it clear for once and all that should i leave all the hopes to work with IronRuby and Asp.Net MVC or i can still keep on dreaming with this. No news are bad news.. and thats really frustrating. Thanks --- I also feel the same. I have just seen this post on web and i though i would repost it here, since the progress of IronRuby is going dead slow since its announcement in Mix 2007 and now since Mix 2009 is round the corner, i see no good news of Version 1.0 and its support with Asp.Net MVC. I have also seen the same frustration on twitter too. Can any one come ahead with a final answer for this? Thanks -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] question on some code from ironrubymvc
Hi While working on the code for a ironrubymvc i came across the following code controllerRubyClass.EnumerateMethods((_, symbolId, __) = { if (String.Equals(symbolId, actionName, StringComparison.OrdinalIgnoreCase)) { controllerRubyMethodName = symbolId; return true; } return false; }); The tidbit I find interesting is the _ and the __ in the lambda. Is that an equivalent for null or does it something else? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] progress on ironrubymvc :)
Hi I think I can have a very basic version of ironruby mvc going over the weekend.. that will probably be without support for things like filters etc. yet.. but you should be able to define a controller and actions in ironruby. I haven't looked at the view engine yet and I'm unclear as to which strategy to use because if ERB works properly then that seem like a great fit to me or should I keep the view engine that is in the current repository and improve on that one iteratively If there are more people interested in using ironruby with asp.net mvc I do have a good idea of what work is involved and how hard it is. There is a fair amount of work involved that means I would need a couple of spikes to get it all going. To make the controllers work etc. I think I will have to define new descriptors that use the the ironruby infrastructure. Does anybody know if the descriptors in the asp.net mvc framework are currently set in stone or if they are still pretty volatile, that is the biggest risk for the controller implementation IMHO? Also there is a conflict between 2 types in the System namespace. System.Func is defined in 2 places. I aliased the System.Core assembly and am using the type from System.Core. This does give some weird results because apparently System.Func, System.Core,..,... and System.Func, System.Core aren't the same when the mvc framework checks for the types of the parameter. Any tips to get around this? Am I doing something wrong? I'll integrate Andrew Peters' inflector to take care of pascal casing, snake casing and pluralisations etc. unless there are objections. It would be good to get some kind of indication/document of what is important from the asp.net, asp.net mvc and the ironruby teams so that I can take that into account when I'm coding this thing up. Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] DLR hosting
it will show that so far I've been working with instead of on IronRuby :) And then I've been focussed on using the Ruby language and .NET from Ruby instead of using C# to host Ironruby. I'm using a debug build from IronRuby and the weird thing is that I have to add ClassHierarchyLocker. var controllerRubyClass = ScriptRuntime.Globals.GetVariableRubyModule(controllerRubyClassName); string controllerRubyMethodName = null; using (rubyContext.ClassHierarchyLocker()) { controllerRubyClass.EnumerateMethods((_, symbolId, __) = { if (String.Equals(symbolId, actionName, StringComparison.OrdinalIgnoreCase)) { controllerRubyMethodName = symbolId; return true; } return false; }); } The question I have here is: Why do I need the ClassHierarchyLocker ? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] building on mono
I updated my mono branch with the sources from ironruby git. I disabled the build of dlr_com and testhost. I wanted to verify.. COM programming AFAIK is windows specific or am I wrong. I don't quite remember the issue I had with the testhost, I didn't spend much time on it to make it all work. I figured that most people would be primarily interested in running ironruby and not finding out which specs fail. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] progress on ironrubymvc :)
Yep I forked your project. I don't have it running yet.. and i did get the source code of the asp.net mvc RC1. Indeed my first goal was to take it to the state it was before.. i think that is the most basic implementation possible. When that works I did want to flesh it out so that it knows how to handle urls with other characters than just alphanumeric. I'm also thinking to replace the custom attributes with class methods like I rails uses for filters etc. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Fri, Jan 30, 2009 at 6:37 PM, Jimmy Schementi jimmy.scheme...@microsoft.com wrote: Did you fork my ironrubymvc project? If so, i'd love to pull any changes you made into it. However, it sounds like you got it to the state it was in before, just updating the ironruby bits? That System.Func/Action clash is a known issue; my suggested work-around for now is to not have ironrubymvc depend on system.core. I'll get on phil to merge his changes as well, and then well have a up-to-date mvc integration :) ~JimmySent from my phone On Jan 30, 2009, at 3:55 AM, Ivan Porto Carrero i...@flanders.co.nz wrote: Hi I think I can have a very basic version of ironruby mvc going over the weekend.. that will probably be without support for things like filters etc. yet.. but you should be able to define a controller and actions in ironruby. I haven't looked at the view engine yet and I'm unclear as to which strategy to use because if ERB works properly then that seem like a great fit to me or should I keep the view engine that is in the current repository and improve on that one iteratively If there are more people interested in using ironruby with asp.net mvc I do have a good idea of what work is involved and how hard it is. There is a fair amount of work involved that means I would need a couple of spikes to get it all going. To make the controllers work etc. I think I will have to define new descriptors that use the the ironruby infrastructure. Does anybody know if the descriptors in the asp.net mvc framework are currently set in stone or if they are still pretty volatile, that is the biggest risk for the controller implementation IMHO? Also there is a conflict between 2 types in the System namespace. System.Func is defined in 2 places. I aliased the System.Core assembly and am using the type from System.Core. This does give some weird results because apparently System.Func, System.Core,..,... and System.Func, System.Core aren't the same when the mvc framework checks for the types of the parameter. Any tips to get around this? Am I doing something wrong? I'll integrate Andrew Peters' inflector to take care of pascal casing, snake casing and pluralisations etc. unless there are objections. It would be good to get some kind of indication/document of what is important from the asp.net, asp.net mvc and the ironruby teams so that I can take that into account when I'm coding this thing up. Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] igem.bat
You have to edit ir.exe.config and change the paths to reflect your installation. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Sat, Jan 31, 2009 at 8:30 AM, jirapong.na...@gmail.com jirapong.na...@gmail.com wrote: How can i get igem.bat work correctly? right now, I get following error. C:\dotNET\ironruby\ironruby\Merlin\Main\Languages\Ruby\Scripts\binSET GEM_PATH=C:\ruby\lib\ruby\gems\1.8 C:\dotNET\ironruby\ironruby\Merlin\Main\Languages\Ruby\Scripts\binset path=%path%;C:\dotNET\ironruby\ironruby\Merlin\Ma in\bin\debug;C:\ruby\lib\ruby\gems\1.8 C:\dotNET\ironruby\ironruby\Merlin\Main\Languages\Ruby\Scripts\binigem.bat list c:\dotNET\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs:406:in `require': no such file to load -- rubygems (LoadError) from :0 Use latest version from GitHub (1ee05cdd) Thank you, -Jirapong ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Using the generated initializer
Hi I thought I created a ruby module and ruby class but I must be doing something wrong. using RubyMethodAttributes=IronRuby.Runtime.RubyMethodAttributes; using RubyModuleDefinition = IronRuby.Runtime.RubyModuleAttribute; using RubyClassDefinition = IronRuby.Runtime.RubyClassAttribute; using RubyMethodDefinition = IronRuby.Runtime.RubyMethodAttribute; namespace IronRubyMvcLibrary.Controllers { [RubyModuleDefinition(IronRubyMvc)] public static class IronRubyMvcModule { [RubyClassDefinition(Controller, Extends = typeof(RubyController))] public class RubyControllerOps { [RubyMethodDefinition(info, RubyMethodAttributes.PublicInstance)] public static void Info(RubyController self) { self.ViewData().Add(Platform, IronRuby Mvc 1.0); } } } } I then used the classinitgenerator to create an initializer class. But when I require the assembly after compiling I can't get to IronRubyMvc or the class. Do I need to do something else? ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Using the generated initializer
That is what I'm doing now The other question was out of curiosity :) On Sun, Feb 1, 2009 at 9:30 PM, Tomas Matousek tomas.matou...@microsoft.com wrote: Any reason why you don't prefer to work with RubyController class directly from Ruby code? … class RubyController def info view_data.add(Platform, IronRuby Mvc 1.0) end end Tomas *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Sunday, February 01, 2009 11:03 AM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] Using the generated initializer Hi I thought I created a ruby module and ruby class but I must be doing something wrong. using RubyMethodAttributes=IronRuby.Runtime.RubyMethodAttributes; using RubyModuleDefinition = IronRuby.Runtime.RubyModuleAttribute; using RubyClassDefinition = IronRuby.Runtime.RubyClassAttribute; using RubyMethodDefinition = IronRuby.Runtime.RubyMethodAttribute; namespace IronRubyMvcLibrary.Controllers { [RubyModuleDefinition(IronRubyMvc)] public static class IronRubyMvcModule { [RubyClassDefinition(Controller, Extends = typeof(RubyController))] public class RubyControllerOps { [RubyMethodDefinition(info, RubyMethodAttributes.PublicInstance)] public static void Info(RubyController self) { self.ViewData().Add(Platform, IronRuby Mvc 1.0); } } } } I then used the classinitgenerator to create an initializer class. But when I require the assembly after compiling I can't get to IronRubyMvc or the class. Do I need to do something else? ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] progress on ironrubymvc :)
I just checked in a somewhat working implementation of asp.net mvc and IronRuby. It is also much faster than I expected. There is no support for filters and the likes yet but you should be able to define controllers. It should also be able to recognize controller actions and controller files by using underscored notation or pascal casing. On Fri, Jan 30, 2009 at 7:30 PM, Ivan Porto Carrero i...@flanders.co.nzwrote: Yep I forked your project. I don't have it running yet.. and i did get the source code of the asp.net mvc RC1. Indeed my first goal was to take it to the state it was before.. i think that is the most basic implementation possible. When that works I did want to flesh it out so that it knows how to handle urls with other characters than just alphanumeric. I'm also thinking to replace the custom attributes with class methods like I rails uses for filters etc. On Fri, Jan 30, 2009 at 6:37 PM, Jimmy Schementi jimmy.scheme...@microsoft.com wrote: Did you fork my ironrubymvc project? If so, i'd love to pull any changes you made into it. However, it sounds like you got it to the state it was in before, just updating the ironruby bits? That System.Func/Action clash is a known issue; my suggested work-around for now is to not have ironrubymvc depend on system.core. I'll get on phil to merge his changes as well, and then well have a up-to-date mvc integration :) ~JimmySent from my phone On Jan 30, 2009, at 3:55 AM, Ivan Porto Carrero i...@flanders.co.nz wrote: Hi I think I can have a very basic version of ironruby mvc going over the weekend.. that will probably be without support for things like filters etc. yet.. but you should be able to define a controller and actions in ironruby. I haven't looked at the view engine yet and I'm unclear as to which strategy to use because if ERB works properly then that seem like a great fit to me or should I keep the view engine that is in the current repository and improve on that one iteratively If there are more people interested in using ironruby with asp.net mvc I do have a good idea of what work is involved and how hard it is. There is a fair amount of work involved that means I would need a couple of spikes to get it all going. To make the controllers work etc. I think I will have to define new descriptors that use the the ironruby infrastructure. Does anybody know if the descriptors in the asp.net mvc framework are currently set in stone or if they are still pretty volatile, that is the biggest risk for the controller implementation IMHO? Also there is a conflict between 2 types in the System namespace. System.Func is defined in 2 places. I aliased the System.Core assembly and am using the type from System.Core. This does give some weird results because apparently System.Func, System.Core,..,... and System.Func, System.Core aren't the same when the mvc framework checks for the types of the parameter. Any tips to get around this? Am I doing something wrong? I'll integrate Andrew Peters' inflector to take care of pascal casing, snake casing and pluralisations etc. unless there are objections. It would be good to get some kind of indication/document of what is important from the asp.net, asp.net mvc and the ironruby teams so that I can take that into account when I'm coding this thing up. Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Silverlight + Silverline
Hi With the latest version of ironruby and rails; silverline doesn't want to work. I haven't really spent much time on it but a few months ago I did commit to doing a presentation on Rails + Silverline + IronRuby this weekend. I have no intention of messing about in that code, it's my new resolution for the year... sometimes say no. That being said if there are some decks available for Silverlight + Rails I'd love to see them ;) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] videos over IronRuby
Hi, I did a couple presentations the last few months on IronRuby or Silverlight + Rails. One was at Devoxx 2008, which I gravely underestimated, where I actually use a lot of content from Jimmy's presentation and I fail horribly. I didn't watch that video because I just know it is really really bad. That presentation was joint with somebody from Microsoft but I couldn't yet find it on the parleys.com site where it is supposed to be published. Then I did one at an Italian Alt.NET gathering. I tried to watch it last night and had to stop because it is more scary than a horror movie. At least now I know I suck at presenting I can learn and do it better next time. I should have done that a long time ago :). I knew I had an accent when speaking english I just didn't know it was that bad either. http://vimeo.com/3059773 Cheers Ivan Disclaimer: don't watch right after eating food or right before going to bed. I am not responsible for any damage or harm inflicted by the video ;) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Silverlight + Silverline
Sweet thanks a lot. :) 2009/2/4 Jimmy Schementi jimmy.scheme...@microsoft.com If you pull the latest bits from github.com/jschementi/agdlr, you can demo the new repl too. Go to samples/ruby/photoviewer =) *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Tuesday, February 03, 2009 11:18 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] Silverlight + Silverline Thanks.. I already stole all your content ;) The demo project silverline-demos does work even with rails 2.2.2 I was trying to create my own demos and that doesn't work. Anyway there is plenty of impressive stuff in the silverline-demos project so I'll just demo those. On Wed, Feb 4, 2009 at 3:08 AM, Jimmy Schementi jimmy.scheme...@microsoft.com wrote: I'm not sure how it does against the newest version of Rails. http://silverline.schementi.com uses Rails 2.0.2, so if you do gem install rails -v2.0.2 then silverline-demos will work. The last time I spoke about silverline was in this talk: http://blog.jimmy.schementi.com/2008/12/jimmy-hacking-at-microsoft.html Look for the section titled Rails integration. If there's other things you'd like to know for your talk, let me know. ~js *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Tuesday, February 03, 2009 10:37 AM *To:* ironruby-core *Subject:* [Ironruby-core] Silverlight + Silverline Hi With the latest version of ironruby and rails; silverline doesn't want to work. I haven't really spent much time on it but a few months ago I did commit to doing a presentation on Rails + Silverline + IronRuby this weekend. I have no intention of messing about in that code, it's my new resolution for the year... sometimes say no. That being said if there are some decks available for Silverlight + Rails I'd love to see them ;) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Silverlight + Silverline
Sweet I will try that tonight. 2009/2/5 Jimmy Schementi jimmy.scheme...@microsoft.com No problem. The stuff hasn't made it to master yet, so it's all in the dev/window branch. So, just make sure to run: git branch --track -b dev/window origin/dev/window ... and then do a build. ~js *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Wednesday, February 04, 2009 10:35 PM *To:* ironruby-core *Subject:* Re: [Ironruby-core] Silverlight + Silverline Sweet thanks a lot. :) 2009/2/4 Jimmy Schementi jimmy.scheme...@microsoft.com If you pull the latest bits from github.com/jschementi/agdlr, you can demo the new repl too. Go to samples/ruby/photoviewer =) *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Tuesday, February 03, 2009 11:18 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] Silverlight + Silverline Thanks.. I already stole all your content ;) The demo project silverline-demos does work even with rails 2.2.2 I was trying to create my own demos and that doesn't work. Anyway there is plenty of impressive stuff in the silverline-demos project so I'll just demo those. On Wed, Feb 4, 2009 at 3:08 AM, Jimmy Schementi jimmy.scheme...@microsoft.com wrote: I'm not sure how it does against the newest version of Rails. http://silverline.schementi.com uses Rails 2.0.2, so if you do gem install rails -v2.0.2 then silverline-demos will work. The last time I spoke about silverline was in this talk: http://blog.jimmy.schementi.com/2008/12/jimmy-hacking-at-microsoft.html Look for the section titled Rails integration. If there's other things you'd like to know for your talk, let me know. ~js *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Tuesday, February 03, 2009 10:37 AM *To:* ironruby-core *Subject:* [Ironruby-core] Silverlight + Silverline Hi With the latest version of ironruby and rails; silverline doesn't want to work. I haven't really spent much time on it but a few months ago I did commit to doing a presentation on Rails + Silverline + IronRuby this weekend. I have no intention of messing about in that code, it's my new resolution for the year... sometimes say no. That being said if there are some decks available for Silverlight + Rails I'd love to see them ;) ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] automating VS
Hi A while ago I remeber seeing a screencast where John Lam shows how to use ironruby to automate visual studio. I can't find the screencast anymore but I would be interested to know which API was used. Was that just using EnvDTE ? I'm asking because at work we are using GAT to automate visual studio and to create a kind of software factory (without the visual designers) When it comes to developing with GAT I think most of us will agree that there are more pleasant ways to develop and debug your work. So I may get the chance to get them to use IronRuby for some of that stuff as long as we can hide from the use case/LOB developers. Using GAT for us is a hazard to make our sprints. Most of our story points for example go into GAT development and debugging, granted that we do make it do some crazy stuff too. Thanks ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] cannot initialize Form with IronRuby
I just compiled the ironruby version from github with rake and for me the following code works. require System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Form = System::Windows::Forms::Form f = Form.new f.show On Sun, Feb 8, 2009 at 7:54 PM, Meinrad Recheis meinrad.rech...@gmail.comwrote: IronRuby 1.0.0.0 on .NET 2.0.50727.1433 Copyright (c) Microsoft Corporation. All rights reserved. require System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyTo ken=b77a5c561934e089 = true Form = System::Windows::Forms::Form = System::Windows::Forms::Form f=Form.new = #System::Windows::Forms::Form:0x05c f.Show() :0: wrong number of arguments (2 for 3) (ArgumentError) f.method( :Show).arity = 0 This is the latest daily DLR build on codeplex from 2009 Feb 1 at 9:36 PM. I read, that with older versions winforms interop has already been working. -- henon ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] test .net code with ruby BDD libraries
Hi Claudio What I did was the following: I cloned ironruby from git then i build it using rake I use this .cmd file in the git root folder which is C:\tools\ironruby in my case @ECHO OFF cd merlin/main/Languages/Ruby ECHO compiling debug version rake compile cd ../../../.. ECHO All done I then change the line in ir.exe.config that sets the paths to read like this: set language=Ruby option=LibraryPaths value=..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8 / I also added the path C:\tools\ironruby\Merlin\Main\Languages\Ruby\Scripts to the PATH variable (that gives you access to igem, irake etc.) That should get ironruby gems to work you can test it by doing igem --version or igem env At this point rubygems seems to be broken in ironruby I get an error + C:\Users\Ivan Porto Carrero » igem install bacon -V --backtrace --debug HEAD 200 OK: http://gems.rubyforge.org/latest_specs.4.8 GET 200 OK: http://gems.rubyforge.org/quick/Marshal.4.8/bacon-1.1.0.gemspec.rz ERROR: While executing gem ... (TypeError) allocator undefined for Zlib::Inflate c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Zlib\zlib.cs:517:in `inflate' rubygems.rb:395:in `inflate' spec_fetcher.rb:77:in `fetch_spec' spec_fetcher.rb:64:in `fetch' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\Enumerable.cs:88:in `map' spec_fetcher.rb:61:in `fetch' dependency_installer.rb:75:in `find_gems_with_sources' dependency_installer.rb:162:in `find_spec_by_name_and_version' dependency_installer.rb:206:in `install' install_command.rb:70:in `execute' c:\tools\ironruby\merlin\main\Languages\Ruby\Libraries.LCA_RESTRICTED\Extensions\IListOps.cs:700:in `each' install_command.rb:45:in `execute' command.rb:129:in `invoke' command_manager.rb:86:in `process_args' command_manager.rb:74:in `run' gem_runner.rb:25:in `run' :0 so to make bacon work you install it with MRI. Then you can copy the folder bacon-1.1.0 from the folders gems, doc, specification in C:\ruby\lib\ruby\gems\1.8 to the folders gems, doc, specification in C:\tools\ironruby\merlin\external\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8 When I did that I could do: + C:\Users\Ivan Porto Carrero » ir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. require 'rubygems' = true require 'bacon' = true On Mon, Feb 9, 2009 at 10:56 PM, Jimmy Schementi jimmy.scheme...@microsoft.com wrote: Sounds like rubygems isn't working correctly on your setup of IronRuby. It's complaining about not finding rbconfig, which gems needs to load. It doesn't have anything to do with bacon, so for now avoid loading it as a gem. We don't have good documentation about how to get gems working in custom build of IronRuby, but that's something I'll be adding shortly. Ivan has gone down the path of getting this set up already, so maybe he can give you some pointers. Ivan? ~js *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Claudio Maccari *Sent:* Monday, February 09, 2009 1:19 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries This works but I would understand why require 'bacon' does not. *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Stefan Dobrev *Sent:* lunedì 9 febbraio 2009 20.32 *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries You can just require the file with its full path. In your case: require 'C:\Ruby\lib\ruby\gems\1.8\gems\bacon-1.1.0\lib\bacon.rb' 2009/2/9 Claudio Maccari claudio.macc...@gmail.com Hi Ivan, now I get this error L C:\Projects\IronRubyir IronRuby 1.0.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. require 'rubygems' IronRuby.Libraries:0:in `require': no such file to load -- rbconfig (LoadError) from :0 from IronRuby.Libraries:0:in `require' from :0 Thanks Claudio *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* domenica 8 febbraio 2009 18.50 *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] test .net code with ruby BDD libraries Hi Claudio try this: require 'rubygems' require 'bacon' On Sun, Feb 8, 2009 at 6:22 PM, Claudio Maccari claudio.macc...@gmail.com wrote: Hi Jimmy, I would try bacon cause it looks simple but I
Re: [Ironruby-core] sharing some stuff + one question on mono
When I build mono from svn then the compression stuff seems to be improperly linked. I have no idea what I should be doing to make that link properly that way I can just keep up with the trunk version on my laptop. On Wed, Feb 11, 2009 at 2:10 PM, Jb Evain j...@nurv.fr wrote: Hey, On 2/11/09, Thibaut Barrère thibaut.barr...@gmail.com wrote: thanks guys for the feedback. Jb: is it fine to use this build ? http://mono.ximian.com/monobuild/preview/download-preview/ It should be fine. Alternatively,the mono-2-4 branch from svn should work as well, and will always be up to date. -- Jb Evain j...@nurv.fr ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] IIS 7 HttpModule for Rails/Rack with IronRuby
Hi Will, I'd be keen to help you with that.. If you've created a project on github please post the url so we can clone, fork and contribute :) cheers Ivan 2009/2/9 Will Green w...@hotgazpacho.org Woops, looks like it was on the GitHub wiki, and I may have ascribed more meaning to what is there: http://wiki.github.com/ironruby/ironruby/libraries I just had this idea this morning after attending a regional Ruby conference (acts_as_conference). I'll get right on getting set up. Thanks! == Will -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jim Deville Sent: Sunday, February 08, 2009 5:23 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] IIS 7 HttpModule for Rails/Rack with IronRuby Hash is mostly implemented. Can you post a link to the page where it shows it as not done? I'll fix it. I don't know if any of the methods needed by Rack are missing. Jimmy, have you tried this scenario? In the mean time, if you started down this road, we'd be happy to have your contributions. If you haven't already, you'll need to get setup to contribute. The instructions are on the Github wiki at: http://wiki.github.com/ironruby/ironruby/contributing. Thanks, JD -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core- boun...@rubyforge.org] On Behalf Of Will Green Sent: Sunday, February 08, 2009 12:23 PM To: ironruby-core@rubyforge.org Subject: [Ironruby-core] IIS 7 HttpModule for Rails/Rack with IronRuby First, I want to say that I'm very excited by the progress of IronRuby. So, my interrest lies in getting Ruby web applications running through IIS 7. Specifically Rails, but also others like Sinatra and Merb, all of which are now built on Rack. Rack implements a new web-to- application protocol, based partly on Python's WSGI, which supplants FastCGI. I've looked, and someone has already created nWSGI on CodePlex. This project implements WSGI, and hosts IronPython to run the Python app. I'm thinking of taking a similar approach, but one of the key requirements of the Rack protocol is that the Rack application's call method takes exactly one param: a Ruby Hash; it cannot be a subclass. Reading the status at IronRuby.net, it looks like Hash is not yet implemented. Is this the case? I guess I'm looking to see if my project is something that can be done at this time, or if IronRuby needs some more help before I can attempt it. I'd be happy to contribute time code to get this working. Thanks! Will Green ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] boolean and to_clr_type
self.dcPlaying.DataType = System::Boolean On Thu, Feb 12, 2009 at 8:42 PM, Brandon Jones li...@ruby-forum.com wrote: I'm working with a windows form application using IronRuby. I'm hitting a snag when using DataSets. I have a DataColumn that I want to be a boolean. But I can't figure out how to set the DataType properly. Numerics are easy enough: self.dcScore.DataType = Fixnum.to_clr_type self.dcTime.DataType = Float.to_clr_type self.dcPlaying.DataType = ??? TrueClass and FalseClass have no CLR type (that I can see). Must I hack in integer values in place of true/false? -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Incorrect library paths in App.Config
I think so.. I actually have an app.config.mine that I use to keep the paths correct. On Fri, Feb 13, 2009 at 3:13 PM, Pete Bacon Darwin bacondar...@googlemail.com wrote: Hi, I just noticed that the App.Config that is generated in an in Unsigned build of IronRuby (i.e. rake compile) contains incorrect library paths. When I tried to run rake mspec:core it failed to require 'fileutils'. Currently (Git commit 6855c7c41ee2...) has the following in Merlin/Main/Config/Unsigned/App.Config: set language=Ruby option=LibraryPaths value=..\..\Languages\Ruby\libs\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\ / But the repository has the following folder layout: Merlin/External/Languages/Ruby/redist-libs/ruby/1.8 And Merlin/External/Languages/Ruby/redist-libs/ruby/site_ruby So therefore this file should look like this: set language='Ruby' option='LibraryPaths' value='..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8'/ I thought I must be wrong since this should have been picked up already but then I guess that most people who are building IR at the moment are either inside MSFT (and using signed builds) or running on Mono and having to rewrite this file anyway. Am I right here? Pete ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] revised package.rake
Hi, In my mono branch I use the following package task. It allows me to package up IronRuby and control the search paths. The problem with the previous task was that it shelled out to windows with windows specific commands. This made it fail on my mac of course. The code comes with no other guarantees except that it works on my machine I didn't fix the zip part because I'm not really interested in an archive, I've got the source ;) # # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this distribution. If # you cannot locate the Microsoft Public License, please send an email to # ironr...@microsoft.com. By using this source code in any fashion, you are agreeing to be bound # by the terms of the Microsoft Public License. # # You must not remove this notice, or any other, from this software. # # # PACKAGE_DIR = File.expand_path(File.dirname(__FILE__) + '/../../../../../dist/') # directory that binary package is created in MERLIN_ROOT = File.expand_path(File.dirname(__FILE__) + '/../../..') BUILD_BIN = #{MERLIN_ROOT}/bin/#{'mono_' if mono?}debug desc Generate an IronRuby binary redist package from the layout task :package do # Directory layouts FileUtils.remove_dir(PACKAGE_DIR, true) if File.exist? PACKAGE_DIR FileUtils.mkdir_p #{PACKAGE_DIR}/bin # Copy Licenses FileUtils.cp Dir.glob(#{MERLIN_ROOT}/Languages/Ruby/Licenses/*), PACKAGE_DIR # Copy binaries FileUtils.cp #{MERLIN_ROOT}/app.config, #{PACKAGE_DIR}/bin/ir.exe.config FileUtils.cp #{BUILD_BIN}/ir.exe, #{PACKAGE_DIR}/bin/ FileUtils.cp Dir.glob(#{BUILD_BIN}/IronRuby*.dll), #{PACKAGE_DIR}/bin FileUtils.cp #{BUILD_BIN}/Microsoft.Scripting.Core.dll, #{PACKAGE_DIR}/bin FileUtils.cp #{BUILD_BIN}/Microsoft.Scripting.dll, #{PACKAGE_DIR}/bin FileUtils.cp Dir.glob(#{MERLIN_ROOT}/Languages/Ruby/Scripts/bin/*), #{PACKAGE_DIR}/bin # Generate ir.exe.config IronRubyCompiler.transform_config_file 'Binary', project_root + 'app.config.mono', #{PACKAGE_DIR}/bin/ir.exe.config # Copy standard library FileUtils.mkdir_p #{PACKAGE_DIR}/lib/ruby unless File.exist? #{PACKAGE_DIR}/lib/ruby FileUtils.cp_r #{MERLIN_ROOT}/../External/Languages/Ruby/redist-libs/ruby, #{PACKAGE_DIR}/lib/ruby FileUtils.cp_r #{MERLIN_ROOT}/Languages/Ruby/Libs, #{PACKAGE_DIR}/lib/ironruby # Generate compressed package if ENV['ZIP'] system %Q{del #{ENV['TEMP']}\\ironruby.7z} system %Q{#{ENV['PROGRAM_FILES_32']}/7-Zip/7z.exe a -bd -t7z -mx9 #{ENV['TEMP']}\\ironruby.7z #{PACKAGE_DIR}\\} system %Q{#{ENV['PROGRAM_FILES_32']}/7-Zip/7z.exe a -bd -tzip -mx9 c:\\ironruby.zip #{PACKAGE_DIR}\\} system %Q{copy /b /Y #{ENV['PROGRAM_FILES_32']}\\7-Zip\\7zSD.sfx + #{ENV['MERLIN_ROOT']}\\Languages\\Ruby\\sfx_config.txt + #{ENV['TEMP']}\\ironruby.7z c:\\ironruby.exe} end end ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Scratch that task.. some file paths have changed
That package task was what worked earlier this week. It looks like some of the paths have changed.. I'll fix it and update my repo. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Incorrect library paths in App.Config
This is from my app.config.mono set language=Ruby option=LibraryPaths value=../lib;../lib/ruby/site_ruby/1.8/;../lib/ruby/site_ruby/;../lib/ruby/1.8/ / On Fri, Feb 13, 2009 at 5:56 PM, Tomas Matousek tomas.matou...@microsoft.com wrote: Yep, you're right. Will fix App.config by the next GIT push. BTW: What changes are needed for Mono? Tomas *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Pete Bacon Darwin *Sent:* Friday, February 13, 2009 6:13 AM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] Incorrect library paths in App.Config Hi, I just noticed that the App.Config that is generated in an in Unsigned build of IronRuby (i.e. rake compile) contains incorrect library paths. When I tried to run rake mspec:core it failed to require 'fileutils'. Currently (Git commit 6855c7c41ee2...) has the following in Merlin/Main/Config/Unsigned/App.Config: set language=Ruby option=LibraryPaths value=..\..\Languages\Ruby\libs\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\ / But the repository has the following folder layout: Merlin/External/Languages/Ruby/redist-libs/ruby/1.8 And Merlin/External/Languages/Ruby/redist-libs/ruby/site_ruby So therefore this file should look like this: set language='Ruby' option='LibraryPaths' value='..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8'/ I thought I must be wrong since this should have been picked up already but then I guess that most people who are building IR at the moment are either inside MSFT (and using signed builds) or running on Mono and having to rewrite this file anyway. Am I right here? Pete ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Incorrect library paths in App.Config
Yes I also found that out.. I added a new one there in my branch. MonoDist On Sun, Feb 15, 2009 at 3:03 PM, Pete Bacon Darwin bacondar...@googlemail.com wrote: Actually the offending bit is actually hard coded into context.rb!! def transform_config_file(configuration, source_path, target_build_path) # signing is on for IronRuby in Merlin, off for SVN and Binary layout = {'Merlin' = { :signing = false, :LibraryPaths = '..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\site_ruby;..\..\..\External\Languages\Ruby\Ruby-1.8.6\lib\ruby\1.8' }, 'Binary' = { :signing = true, :LibraryPaths = '..\lib\IronRuby;..\lib\ruby\site_ruby\1.8;..\lib\ruby\site_ruby;..\lib\ruby\1.8' } } transform_config source_path, target_build_path, layout[configuration][:LibraryPaths] end Pete *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Tomas Matousek *Sent:* Friday,13 February 13, 2009 16:57 *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] Incorrect library paths in App.Config Yep, you're right. Will fix App.config by the next GIT push. BTW: What changes are needed for Mono? Tomas *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Pete Bacon Darwin *Sent:* Friday, February 13, 2009 6:13 AM *To:* ironruby-core@rubyforge.org *Subject:* [Ironruby-core] Incorrect library paths in App.Config Hi, I just noticed that the App.Config that is generated in an in Unsigned build of IronRuby (i.e. rake compile) contains incorrect library paths. When I tried to run rake mspec:core it failed to require 'fileutils'. Currently (Git commit 6855c7c41ee2...) has the following in Merlin/Main/Config/Unsigned/App.Config: set language=Ruby option=LibraryPaths value=..\..\Languages\Ruby\libs\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\1.8\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\site_ruby\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\ / But the repository has the following folder layout: Merlin/External/Languages/Ruby/redist-libs/ruby/1.8 And Merlin/External/Languages/Ruby/redist-libs/ruby/site_ruby So therefore this file should look like this: set language='Ruby' option='LibraryPaths' value='..\..\Languages\Ruby\libs;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby\1.8;..\..\..\External\Languages\Ruby\redist-libs\ruby\site_ruby;..\..\..\External\Languages\Ruby\redist-libs\ruby\1.8'/ I thought I must be wrong since this should have been picked up already but then I guess that most people who are building IR at the moment are either inside MSFT (and using signed builds) or running on Mono and having to rewrite this file anyway. Am I right here? Pete ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] RubyCLR anyone?
Subversion already has MRI ruby bindings.You may want to look into those instead of interop with .NET http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/ http://www.oneofthewolves.com/2007/12/22/ruby-subversion-bindings-better-documentation/ http://agylen.com/2006/07/14/using-the-ruby-bindings-for-subversion/ http://svn.collab.net/repos/svn/trunk/subversion/bindings/swig/ruby/ On Mon, Feb 16, 2009 at 3:36 PM, Roman Zawada li...@ruby-forum.com wrote: Hi, I asked this question http://www.ruby-forum.com/topic/178661 in main ruby forums, because its about MRI ruby and it's gem, but maybe here I can find someone who will know the answer or at least can provide some useful information. I'm really looking forward to start using IronRuby after it's first stable release, before this I'm stuck with MRI. :-/ Thanks -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] Implementing ASP.NET MVC
Hi, I'm currently implementing ActionFilters and ActionResults in ironruby mvc. I do have some questions about that.. Why so many filters? Is there an example somewhere so I can see their intended use? At the moment I'm doing it this way: class HomeController Controller before_filter :some_name do |ar| # do some really cool shizzit here end before_filter :some_action after_filter around_filter result_filter exception_filter authorize_filter # or filter :some_name, :when = :after do |res|; end; filter :action_name, :when = :authorize end Then there are also selectors.. they seem to do the same thing as filters but I might be mistaking. Can I just lump those together and just call it a different kind of filter? What would be the best strategy because the amount of filters is a little bit over doing it IMHO ? Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] community chapter
Hi I would like to put a real-world IronRuby chapter in my book that is created by people from the community. People that are interested in writing a short piece (2-5 pages in word) on how IronRuby made their live easier because of ... Michael has a thing about ActiveDirectory Daniele also has a topic. I was thinking Ben if anybody else is interested just let me know and I'll give you access to the repository in which we stick all our stuff around that. 2 pages would be an average blog post :) Also I took over the rubydoes.net website. If somebody wants to blog there = email me :) Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] community chapter
Great! Other people I thought about were Thibaut Barrère Robert Brotherus Cheers On Wed, Feb 18, 2009 at 11:54 AM, Ben Hall ben200...@googlemail.com wrote: Hi Ivan, Sounds like a great idea! I would be interested in writing a couple of pages, i'll contact you offline - if I don't, nudge me ;) Ben On Wed, Feb 18, 2009 at 6:49 AM, Ivan Porto Carrero i...@flanders.co.nz wrote: Hi I would like to put a real-world IronRuby chapter in my book that is created by people from the community. People that are interested in writing a short piece (2-5 pages in word) on how IronRuby made their live easier because of ... Michael has a thing about ActiveDirectory Daniele also has a topic. I was thinking Ben if anybody else is interested just let me know and I'll give you access to the repository in which we stick all our stuff around that. 2 pages would be an average blog post :) Also I took over the rubydoes.net website. If somebody wants to blog there = email me :) Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] community chapter
Another one I'd like to convince to write a short essay is Orion Edwards. I believe we've actually met once or twice when I was living in Wellington but can't be sure, my memory is like swiss cheese. I'm discussing with the publisher on how we can make this work for them too and next week I'll contact all of you off list to discuss this further. If there are other people listening that have done something cool please tell me about it. I firmly believe in the fact that enthusiasm and success stories are the best way to spreading something. 2009/2/19 Robert Brotherus robert.brothe...@napa.fi Hi Ivan, Yes, I can also write about our (still ongoing) path to WPF + XAML + IronRuby enlightment Any deadline you want to set for contributions? Let's continue in private emails. Robert Brotherus -- *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Wednesday, February 18, 2009 2:14 PM *To:* ironruby-core@rubyforge.org *Subject:* Re: [Ironruby-core] community chapter Great! Other people I thought about were Thibaut Barrère Robert Brotherus Cheers On Wed, Feb 18, 2009 at 11:54 AM, Ben Hall ben200...@googlemail.com wrote: Hi Ivan, Sounds like a great idea! I would be interested in writing a couple of pages, i'll contact you offline - if I don't, nudge me ;) Ben On Wed, Feb 18, 2009 at 6:49 AM, Ivan Porto Carrero i...@flanders.co.nz wrote: Hi I would like to put a real-world IronRuby chapter in my book that is created by people from the community. People that are interested in writing a short piece (2-5 pages in word) on how IronRuby made their live easier because of ... Michael has a thing about ActiveDirectory Daniele also has a topic. I was thinking Ben if anybody else is interested just let me know and I'll give you access to the repository in which we stick all our stuff around that. 2 pages would be an average blog post :) Also I took over the rubydoes.net website. If somebody wants to blog there = email me :) Cheers Ivan ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
[Ironruby-core] possible problem on mono
Hi When I try to run the igem script on mono it always comes back with a NullReferenceException. igem list --debug --backtrace ERROR: While executing gem ... (System::NullReferenceException) Object reference not set to an instance of an object IronRuby.Libraries:0:in `TryFlattenArray' :0:in `flatten!' mscorlib:0:in `_stub_$2591' gem_runner.rb:25:in `run' mscorlib:0:in `_stub_$2495' igem:0 Is this known or should I add it to the bugs? ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] possible problem on mono
I'll try but i'm just moving into a new flat so it may take a few days before I get some actual pc time --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Fri, Feb 20, 2009 at 5:59 PM, Tomas Matousek tomas.matou...@microsoft.com wrote: Could you try to narrow it down to a simple repro? What parameters are passed to flatten! that make it fail? (You may want to run it with –D to get full stack information, although it will be slower). Tomas *From:* ironruby-core-boun...@rubyforge.org [mailto: ironruby-core-boun...@rubyforge.org] *On Behalf Of *Ivan Porto Carrero *Sent:* Friday, February 20, 2009 12:31 AM *To:* ironruby-core *Subject:* [Ironruby-core] possible problem on mono Hi When I try to run the igem script on mono it always comes back with a NullReferenceException. igem list --debug --backtrace ERROR: While executing gem ... (System::NullReferenceException) Object reference not set to an instance of an object IronRuby.Libraries:0:in `TryFlattenArray' :0:in `flatten!' mscorlib:0:in `_stub_$2591' gem_runner.rb:25:in `run' mscorlib:0:in `_stub_$2495' igem:0 Is this known or should I add it to the bugs? ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Re: [Ironruby-core] Regression ? Invalid IL code in (wrapper dynamic-method)
I can confirm this but from git. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim On Thu, Feb 26, 2009 at 11:41 PM, Thibaut Barrère thibaut.barr...@gmail.com wrote: Hi again, I'm using Mono 2.4 to run the binaries at http://nightlybuilds.cloudapp.net/rss.ashx?project=dlr(DLR.x.release.zip) - (not sure if it supposed to work, but it did until today). Everything I tried worked fine with DLR.10606.release.zip. Switching to the latest DLR.12211.release.zip makes require 'mscorlib' throw the following error: mscorlib:0:in `CreateDelegate': Invalid IL code in (wrapper dynamic-method) object:CallSite.Target (Microsoft.Runtime.CompilerServices.Closure,Microsoft.Runtime.CompilerServices.CallSite,IronRuby.Runtime.RubyContext,IronRuby.Builtins.MutableString): IL_0024: pop (System::InvalidProgramException) from mscorlib:0:in `CreateDelegate' from mscorlib:0:in `CreateDelegate' from Microsoft.Scripting.Core:0:in `CreateDelegate' from Microsoft.Scripting.Core:0:in `Compile' from Microsoft.Scripting.Core:0:in `Compile' from Microsoft.Scripting.Core:0:in `SetTarget' Is it a know issue ? (I'm staying on previous builds for the moment). -- Thibaut ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core