http://www.iunknown.com/articles/2006/03/16/third-drop-of-rubyclr
Here's a brief summary of the current feature set of the bridge:
- 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 is now a pretty cool Avalon (Windows Presentation Foundation) sample
in this release. It renders math equations from a quick and dirty Ruby DSL
that I hacked up yesterday. I think it really shows off some of the cool
things you can do when you have a powerful client-side rendering engine. You
can see a screenshot here:
http://www.iunknown.com/articles/2006/03/15/rubyclr-and-avalon
I did a lot of perf tuning in this release, so dynamic compilation time of
the interop shims should be much faster. Runtime performance is pretty good
- I can parse a 7.5MB XML doc using XmlTextReader (a pull-mode XML parser)
which results in over a million calls across the interop boundary in about
2s.
Comments / flames / suggestions / contributions are always welcome.
Cheers,
-John
http://www.iunknown.com
An aside... but I was wondering if you could tell me exactly what a
.NET assembly is.
Thanks,
T.
Sounds great, John. I can't wait to start playing with it this weekend.
--
Posted via http://www.ruby-forum.com/.
Regards,
Robert
> An aside... but I was wondering if you could tell me exactly what a
> .NET assembly is.
a .NET assembly is what you get when you compile a .NET (C#, VB.Net...)
language into binary form.
cheers
Thibaut
double cheers
T-
> The next drop of RubyCLR will likely have what you need. In that release I'm
> planning to let you implement arbitrary CLR interfaces on your Ruby objects.
> So I'll need to generate a .NET shadow class for the Ruby class, so I'll
> need to add support into the core to support that.
>
Sounds great. But at least a month away?
Thanks,
Robert
I use Komodo for all the Ruby parts of the code. I use VS 2005 for the C++
stuff.
Mono doesn't have a C++/CLI implementation so it won't work there. But I
believe they have enough runtime support for all of the DynamicMethod stuff
As .NET should be portable (I never tried it), are there any chances to
use your cool assembly to write Ruby Programs on Pocket PC based systems
(which should run a NET framework on)?
--
Daniel Völkerts
Protected by Anti Pesto.
I don't have any experience but I'll try tomorrow (uuh, the big trial
day for ruby on pocket pc *g*)
g,
[snip]
Very interesting. Thanks for your hard work.
John, did you get the email I sent you a couple of
days ago?
Hal
*g* Oooh yes, I've no experience. The package is cool and works as
expected under Win XP, but as there are no ruby interpreter which access
CLR I can't get it working under WinCE 5.0
Nice weekend,