[Mono-dev] Mono embedded scripting language advice

David Jung jungdl at ornl.gov
Fri Feb 17 09:58:48 EST 2006


mail.matt.mcdonald at gmail.com wrote:
> It depends a lot on what you want to do, but why not just use C#? 
Thanks for the tip Matt, that looks pretty simple to do.  Unfortunately, 
I wanted to
use a scripting language specifically to make life easier for the users
(developer users) entering code to call functions that take complex types
eaiser.  Most scripting languages have good support for converting literals
and strings into stuct/class types and arrays.  Also, most have the 
option of
not having to pre-declare variables.
For example, compare something like this (partically hypothetical):

MoveToJointCmd( { 'EEStraightLine' , 'TestPoint' } , [.2, .2, .1, .2, 
.2, .1] , 0)

to C#:

JointPositionList j = new JointPositionList();
j.p[0] = .2; j.p[1] =  .2; j.p[2] = .1; j.p[3] = .2; j.p[4] = .2; j.p[5] 
=  .1;
TrajStyle style = new TrajStyle(EEStraightLine);
style.TargetName = "TestPoint";
MoveToJointCmd(style, j, 0);

I know there would be ways to minimize the C# verbosity, but I think you
see my point.

[...]
>
> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of David Jung
> Sent: Thursday, February 16, 2006 4:09 PM
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-dev] Mono embedded scripting language advice
>
> Hi.
> I have an app in which I have a small 'console' text area in which I'd 
> like to have users enter small snippet of code in a scripting language, 
> that I can then execute.  I'd also like to define some 'functions' 
> up-front that will access my app's (C#) classes.
>
> Can someone recommend an implementation of a scripting language that is 
> known to work with Mono? (and is stable)
> I tried boo, but the latest version crashes on 'print "hello world"' 
> with the latest release (and svn) versions of mono
> (on FedoraCore 4).
> Next I tried IronPython Beta 3 - which crashes on startup with a 'not 
> implemented' exception.
> The Mono JavaScript page says it is under heavy development and one of 
> the future plans is "Access to Mono's base class library".
>
> What other options are there that are known to work reliably? 
> (I don't know VB, but I understand it is not really a scripting 
> language, right?).
>
> Thanks,
> -David.
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>   




More information about the Mono-devel-list mailing list