ANN: Third Drop of RubyCLR

J

John Lam

------=_Part_5232_29039392.1142561846035
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

This is the biggest release so far of the RubyCLR bridge:

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 =96 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. Yo=
u
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

------=_Part_5232_29039392.1142561846035--
 
T

Trans

Sound like this is really coming along. I wonder does the project have
a web page of its own?

An aside... but I was wondering if you could tell me exactly what a
..NET assembly is.

Thanks,
T.
 
J

John Lam

------=_Part_5612_23915871.1142563318093
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

The project will migrate over to rubyforge between now and the next release=
 
R

Robert Feldt

John, does this address my earlier comments about being able to create
your own assemblies with the RubyCLR "embedded cil assembler"?

Regards,

Robert
 
T

Thibaut Barrère

Hi Trans
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
 
R

Robert Feldt

Unfortunately, no. There should be enough features to support creating a = new
type using Reflection (although I haven't tried yet), but I don't have a = way
to use my CIL assembler (aka RbDynamicMethod) code to generate a
non-DynamicMethod-yet. Now that said, you could hack that in by adding so= me
code to core.h; it shouldn't be too difficult to do.
Ok, I will take a look. Any you are using Komodo for all this dev?
Only Windows yet though or could this work also on the Mono/Linux
side?
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 objec= ts.
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
 
J

John Lam

------=_Part_3683_12459305.1142606743173
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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=
 
D

Daniel Völkerts

John said:
Comments / flames / suggestions / contributions are always welcome.

As .NET should be portable (I never tried it), are there any chances to=20
use your cool assembly to write Ruby Programs on Pocket PC based systems=20
(which should run a NET framework on)?

--=20
Daniel V=F6lkerts
Protected by Anti Pesto.
 
J

John Lam

------=_Part_6323_19382033.1142614229602
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I really haven't looked at what features the compact framework stuff
supports. DynamicMethod support would be an absolute minimum. Does Ruby run
on any compact framework systems?

-John
http://www.iunknown.com


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)?

------=_Part_6323_19382033.1142614229602--
 
D

Daniel Völkerts

John said:
I really haven't looked at what features the compact framework stuff
supports. DynamicMethod support would be an absolute minimum. Does Ruby= run
on any compact framework systems?

I don't have any experience but I'll try tomorrow (uuh, the big trial=20
day for ruby on pocket pc *g*)

g,
--=20
Daniel V=F6lkerts
Protected by Anti Pesto.
 
H

Hal Fulton

John said:
This is the biggest release so far of the RubyCLR bridge:

[snip]

Very interesting. Thanks for your hard work.

John, did you get the email I sent you a couple of
days ago?


Hal
 
D

Daniel Völkerts

Daniel said:
I don't have any experience but I'll try tomorrow (uuh, the big trial=20
day for ruby on pocket pc *g*)

*g* Oooh yes, I've no experience. The package is cool and works as=20
expected under Win XP, but as there are no ruby interpreter which access=20
CLR I can't get it working under WinCE 5.0

Nice weekend,
--=20
Daniel V=F6lkerts
Protected by Anti Pesto.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top