Third Drop of RubyCLR
This is the biggest release of RubyCLR yet. You can download it here. Here’s a brief summary of RubyCLR as of this drop:
- Reference .NET assemblies by assembly name or by filename
- Create and manipulate .NET reference and value types
- Automatically marshal .NET reference and value types to / from Ruby
- Dynamic generation of interop code using CIL instructions
- Create and manipulate generic .NET reference types
- Discover and consume .NET interfaces on a .NET object
- Implement .NET event handlers using Ruby blocks
- Map .NET member names to Ruby names (e.g. WordCount becomes word_count)
- Mix in Ruby Enumerable support for .NET IEnumerable types
- Dynamically access .NET XML documentation from irb (requires text/format – to make it work uncomment require in rubyclr.rb)
There are several sample applications to show you what’s possible:
- GoogleCalc lets you access Google’s calculator from a rich client application
- RssReader is a Windows Forms 2.0 RSS reader
- Math is a Windows Presentation Foundation (aka Avalon) application that renders math equations using a domain specific language
The source code has been massively reorganized from the last drop. If you’re using Komodo you’ll find Komodo project files in this drop to make it easier to navigate the non C++ source code.
I’m going to be pretty busy for the next three weeks doing work to pay the bills around here, so work is going to slow down quite a bit on the bridge. I hope this release is of sufficient quality to sustain y’all for the next month or so. Let me know by email (jlam at this domain) if you have any reproducible showstopper bugs and I’ll see what I can do to get a patch out the door.
Enjoy!
Thank you! :-)
Posted by: Eirik | March 17, 2006 at 03:36 AM
This looks very interesting. I haven't followed the development up to this point so forgive me if this is an ignorant question... does RubyCLR only work in VS '05?
Posted by: Jason Cartwright | March 17, 2006 at 12:45 PM
Sweet! I am real excited to dig into this.
Posted by: Justin | March 17, 2006 at 12:48 PM
Jason - it only works with .NET 2.0 - there are no dependencies on Visual Studio itself.
Posted by: John Lam | March 17, 2006 at 01:17 PM
John,
Did you see this:
http://www.plas.fit.qut.edu.au/rubynet/
Posted by: Jason Bock | March 20, 2006 at 10:15 AM
Yes I have - I've chatted with both John Gough and Wayne Kelly at OOPSLA. There are some really hairy technical challenges that they have to overcome so that's likely why you haven't seen anything out of them quite yet. But they're smart guys- I'm looking forward to seeing what comes out of their group.
Posted by: John Lam | March 20, 2006 at 01:52 PM
Are you familiar with the Ruby/.Net bridge from http://www.saltypickle.com/rubydotnet ?
I've used it some in the past for stubs and generators for component/integration testing with good success (not without issues though).
I'll be checking out your RubyCLR soon...
regards.
Posted by: Edwin King | March 28, 2006 at 12:16 PM
Ah, a bit of history.
The saltypickle bridge was OK, but not particularly interesting due to their socket implementation which resulted in awful performance. Thomas Sondergaard's rubydotnet bridge was *far* superior, and was a major source of inspiration for the first version of my bridge (which was never publicly released).
RubyCLR is much, much faster than either of these bridges (Thomas used Reflection to invoke, and RubyCLR uses dynamically generated CIL shims). There are also a lot of additional features in RubyCLR which makes it far more natural to use (such as mapping method names like GetCount to get_count).
Posted by: John Lam | March 28, 2006 at 11:23 PM
I'm impressed with your work, good job!
Just one note, I ran the testsuite, and got one failure:
test_say_hello(RubyMethodTests) [./tests_rbdynamicmethod.rb:73]: expected but was .
That is, in my locale, decimal point is different than in your tests. Not a big deal though.
Still waiting for a proper project page to follow though =)
Posted by: scoopr | March 30, 2006 at 03:14 AM
Thanks for the bug report. I'm happy to see that the CLR is localizing strings correctly. Now I just have to figure out how to localize that string in Ruby :)
Posted by: John Lam | March 30, 2006 at 11:06 AM
Hi
Is there someway possible to interact with Tao's opengl or CsGL in RubyCLR, I have tried to import the libs but it doesn't work. Is it because they are built for .net 1.x?
I tested another bridge, which is for .net 1.x but it didn't work to import the libs there either.
What I need is to use OpenGL with .net forms (in ruby using rubyclr, for my examwork)
Posted by: gudski | April 04, 2006 at 09:44 AM
I didn't know anything about CsGL before your post. I downloaded it and did a quick import of the wrapper lib and that worked. But since I don't know anything about CsGL I'll have to take a look at the samples to see if I can get it up and running.
Cool examwork project :)
Feel free to contact me direct via jlam at this domain about your project. This could make for yet another cool demo for the next release of the bridge.
Posted by: John Lam | April 04, 2006 at 08:17 PM
I took a closer look at one of the samples (MesaBounce.cs) and it appears that you have to derive a new class from CsGL.Basecode.Model and override some virtual methods (like Draw). Unfortunately, RubyCLR does not support deriving new Ruby classes from CLR base classes. Is there some other way of implementing the OpenGL code so that you don't have to derive from a library base class?
Posted by: John Lam | April 04, 2006 at 10:47 PM
hi,
I am not able to download RubyCLR.
Posted by: anubhav_kuhad@yahoo.com | October 10, 2006 at 04:01 AM
Broken link...
Posted by: John | October 20, 2006 at 08:14 AM
Me too:(
Posted by: csikung (chi kung, qigong) | November 20, 2006 at 03:00 PM
Thanks for the bugreport. Fucking spammers:(
Posted by: csikung | December 06, 2006 at 02:53 AM
yeah link ain't work;/
Posted by: praca | December 08, 2006 at 01:48 AM
This release is great
Posted by: Christophe | March 05, 2007 at 03:11 AM
Thanks for very interesting article and release. Greetings
Posted by: PK | March 07, 2007 at 07:36 AM
Thanks for very interesting article and release. Greetings
Posted by: PK | March 07, 2007 at 07:36 AM
I'm impressed with your work, good job! Just one note, I ran the testsuite, and got one failure: testsayhello(RubyMethodTests) [./tests_rbdynamicmethod.rb:73]: expected but was .
That is, in my locale, decimal point is different than in your tests. Not a big deal though.
Still waiting for a proper project page to follow though =)
Posted by: scoopr | April 07, 2007 at 02:19 PM
It requires at a minimum .NET 2.0
Posted by: John Lam | April 15, 2007 at 02:40 PM
Thanks for help,thats the answer of all my questions
Posted by: celebrity | April 30, 2007 at 01:02 AM
Thanks for help,thats the answer of all my questions
Posted by: celebrity | April 30, 2007 at 01:03 AM
Thanks for help,thats the answer of all my questions
Posted by: celebrity | April 30, 2007 at 01:04 AM
Thanks for help,thats the answer of all my questions
Posted by: celebrity | April 30, 2007 at 01:05 AM
Thanks for help,thats the answer of all my questions
Posted by: celebrity | April 30, 2007 at 01:05 AM
Thanks for help,thats the answer of all my questions
Posted by: celebrity | April 30, 2007 at 01:05 AM