Ruby .NET, RubyCLR, and Assemblies

(Resending again as plain-text (hopefully) to ensure it makes it through
the google groups gateway.)

My company is working on a piece of software right now that is using
.NET. One of the features is a scripting console similar to IRB: the
user may type in one-off commands and see the effect in the application.

I want the scripting language to be Ruby. Right now, it’s IronPython.
I’ve been told that the reason is that with using Ruby under this
scenario, a new Assembly is created for each command that the user
enters. This is a Bad Thing, as it’s been described to me, for
performance and memory. IronPython doesn’t suffer this problem. (I was
also told that there is some nasty way to get around the problem that
involves tying objects together and marshalling data back and forth. Or
something. Hopefully I got the description right; I’m a Ruby scripter,
not a .NET programmer.)

  1. Does this sound correct to people who know Ruby/.NET or RubyCLR?

  2. If it’s not correct, could you elaborate on how one might achieve the
    functionality I describe above?

  3. If it is correct, how can it be fixed? If Python managed a solution,
    I assume Ruby could as well.

I’d really like our software to use Ruby, and I could probably convince
the engineers to use it if we could overcome this hurdle. More Ruby
everywhere is better for the world. :wink:

Gavin K. wrote:

I want the scripting language to be Ruby. Right now, it’s IronPython.
I’ve been told that the reason is that with using Ruby under this
scenario, a new Assembly is created for each command that the user
enters. This is a Bad Thing, as it’s been described to me, for
performance and memory.

The short answer is no. RubyClr uses .NET’s DynamicMethod.

I’d really like our software to use Ruby, and I could probably convince
the engineers to use it if we could overcome this hurdle. More Ruby
everywhere is better for the world. :wink:

I don’t know that RubyClr is necessarily ready to be depended on. Don’t
get me wrong, it does some things well, but last I looked it still had
object-identity issues and that’s a major problem for writing anything
reliable.

It’s fun for short-lived scripts with low object counts though.

Can you provide some examples of object-identity issues? Or perhaps
an URL ?

I am interested in using RubyCLR in production code.

thanks,

devdev

On Jan 16, 5:10 pm, “Sam S.” [email protected] wrote:

I don’t know thatRubyClris necessarily ready to be depended on. Don’t
get me wrong, it does some things well, but last I looked it still had
object-identity issues and that’s a major problem for writing anything
reliable.

On 1/29/07, devdev [email protected] wrote:

Can you provide some examples of object-identity issues? Or perhaps
an URL ?

I am interested in using RubyCLR in production code.

http://www.iunknown.com/articles/2006/10/05/interfaces-that-dont-break-object-identity
http://www.iunknown.com/articles/tag/rubyclr