tags:

views:

131

answers:

7

what do people use for scripting in .net apps. New question after MS drops IronPython

IP used to be my favorite; then Lua

What do I mean by scripting. I mean I have a large system management tool that allows users to plugin bits of smartness, this include assemblies and scripts. What language should I use for the scripts. So I need an embeddable interpreter, prefably one that integrated well with .net

The MS announcement is here

http://www.theregister.co.uk/2010/10/22/microsoft_kills_dynamic_languages_projects/

F# - several people have said F#. Is F# usable as an embedded scripting language?

+1  A: 

F#

Windows Scripting with VB Script

Robert Greiner
+1  A: 

IronRuby

abatishchev
even though MS dropped it?
pm100
+5  A: 

Powershell is .net net native scripting shell that can be imported into your app. As time has gone one I have come to use it to do everything from unit test to provide extensibility. Also it ships on every version of windows after 7 so you don't need to worry about installing it, and efforts are underway to develop a mono based version.

rerun
Plus, Powershell allows you to instantiate .NET class object into your script and use their features, etc.
Will Marcouiller
I have looked into this before but always felt that PS was too shell like (and the hosting was tough). Do you have any pointer to good sites talking about embedding poweshell
pm100
For sites on hosting the powershell engine, try Google (http://www.google.com/search?q=hosting+powershell). The hosting is definitely not difficult. If you don't want to offer a formal PS host, you can also fork powershell.exe, and send input to it, gathering the text output. I do this for a c# completion engine, and it works well. Not sure what you mean by "PS is too shell like". It is a shell. The question is, does it satisfy your requirement for extensibility in your particular scenario? Whether it is a shell is probably irrelevant.
Cheeso
+1  A: 

We are using C# most of the time for scripting. Compilation and integration on the fly is possible inside own applications. Even as a replacement for pure scripting is feasible in a nice way, have a look at http://www.csscript.net/

jdehaan
+2  A: 

F#, Lua.

But we often use C# either via Mono: How To Host Mono’s CSharp Compiler as a Service in .NET - For Runtime Code Evaluation/REPL or via implementing in our apps or via The C# Script Engine

Nick Martyshchenko
+1  A: 

Iron Python, Miguel de Icaza of mono fame has taken over as project leader. http://tirania.org/blog/archive/2010/Oct-22.html

stonemetal
+1  A: 

We made a decision almost 2 years ago and the finalists were Python and Lua. At that time, IronPython got the nod because it was supported by MS. VBA quit getting licensed to new customers back in 2007, VSTA looks to be far cheaper, but at $50/seat (with an annual committment in the high-5 to low-6 digit range) it is still beyond what the boss will accept.

It looks like we need to re-evaluate our scripting language decision. The current application we're using this in, is one that licenses for mid 5-digits and automates several of our other software products (that sell for mid-3 to low-4 digits.

Probably the books that are most applicable for scripting inside applications are the books written for game devlopers, usually with titles like "AI for games." A lot of other companies that make money selling software have made the decision to chose lua or python for some decent reasons, and it might be helpful to read some details explaining why they went those routes.

Tangurena