DLR Language Design Example
Can someone point me to an example of building a simple hosted language using the DLR? My needs are modest, basically I just want to be able to evaluate simple case-insensitive expressions. ...
Can someone point me to an example of building a simple hosted language using the DLR? My needs are modest, basically I just want to be able to evaluate simple case-insensitive expressions. ...
Is there a DLR-enabled XML navigation and reading class available in .NET 4.0? For example, imagine I have this XML: <foo> <bar>foobar is here</bar> <bar>foobar is also here</bar> <baz>foobar is not here</bar> </foo> Is there an easy way to navigate through this XML like this: var doc = SomeDlrEnabledParser.Parse (xmlStrin...
I want to create an instance of an IronPython class from C#, but my current attempts all seem to have failed. This is my current code: ConstructorInfo[] ci = type.GetConstructors(); foreach (ConstructorInfo t in from t in ci where t.GetParameters().Length == 1 select t) { ...
What is the main Advantage of DLR in C#4? ...
After some quick tinkering, right now I'm leaning towards powershell for two main reasons (note these a purely my opinions and if they are wrong, I'd love to know!!!): 1) It's simple to create a runspace with classes in your application, and therefor easy to make your application scriptable. 2) I've heard some rumors that IronRuby and...
I guess everyone has already heard the news about some key developers leaving the Dynamic Languages team due to what they perceive as waning support for Dynamic Languages at Microsoft. I'm quite fond of Python and try to use it often. So, by extension, I care about IronPython and would like to see it continue to evolve. I'm sure many pe...
We have an IDE for machine automation that allows its users to develop solutions by connecting objects and components visually. They can also write "plugins" using c++ and c#. The IDE is written using .NET. Its users often are not founded in traditional software development and programming but more in the direction of technical/electrica...
Hello, what I want to do is to introduce the AppDomain of the running Application into the loaded (Iron)Ruby script. Here is an example of what I want to achieve: using System; using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using IronRuby; namespace Testing { public class MainClass { public MainClass() ...
I'm hosting an IronPython engine instance in my C# (Silverlight 4) app to execute some Python scripts on the fly. These scripts can return values of either IronPython.Modules.PythonDateTime+datetime, IronPython.Modules.PythonDateTime+date or IronPython.Modules.PythonDateTime+time types. I need to convert these to System.DateTime values i...
Our system lets us write Iron Python scripts that can be executed as needed. As part of debugging I'd like to be able to write some script and debug in VS 2010. So I attach the debugger to the program and then type in my script. However I would like to try an get source level debugging working, and to do this I need to tell VS2010 to o...
So, the situation is I have a C# generic class named Foo with a template parameter T which has the new() constraint. I've declared my classes something like this: class Baz { public Baz() { } } class Foo<T> where T : Baz, new() { // blah blah } And in Python: class Bar(Baz): def __init__(self): """ do various...
I would like to add some scripting support to a Silverlight 4 application that I'm working on. I have the latest stable releases of both IronRuby and IronPython installed on my machine with Visual Studio 2010. I looked at some samples of using the ScriptEngine class with both IronRuby and IronPython. I even got it to work in a small Wind...
Hi, I'm building an IronRuby Console in silverlight 4 and WinForms (net4). I can redirect the output without problems: MyRuntime = Ruby.CreateRuntime(); msOutput = new MemoryStream(); MyRuntime.IO.SetOutput(msOutput, Encoding.UTF8); MyEngine = MyRuntime.GetEngine("rb"); MySource = MyEngine.CreateScriptSourceFromString("a='123'\nputs a...
There was a flurry of posts on the web about "Managed VBScript", the DLR & VBx right after Mix07 but I've not seen anything about it since. So, what is going on? Has it been dropped? Implemented? ...
I have the following IronPython code. class Hello: def __init__(self): pass def add(self, x, y): return (x+y) I could make the following C# code to use the IronPython code. static void Main() { string source = GetSourceCode("ipyth.py"); Engine engine = new Engine(source); ObjectOperations ops = en...
I’ve got a massive memory leak in my program. This is the first time I’ve used IronPython in a tight loop, so I’m wondering if this could be the cause. For Each column In m_Columns Dim rawValue As String rawValue = line.Substring(column.FileColumnIndex.Value - 1, column.FileColumnEndIndex.Value - column.FileColumnIndex.Value ...
I am trying to use IronPython in the browser and attempting to import external python scripts: <script src="http://gestalt.ironpython.net/dlr-latest.js" type="text/javascript"> </script> ... <script type="application/python" src="test.py" defer="true"></script> <script type="application/python"> import test test.Hello() </script> The ...
Is it okay to start using Iron Ruby and Iron Python in production systems? Also, are there any additional requirements for hosting them? And, for the bonus points, given that F# is a functional programming language in the same way that Python is, is there any advantage to using one over the other within the .NET framework? ...
I'm looking to possibly use IronRuby as the primary language for development of a Silverlight 4 application. I know there's the "IronRuby in the Browser" stuff that uses Gestalt, but I would like to build a standard Silverlight Applicatin using IronRuby and XAML that gets compiled into a XAP file, just like you can in C#. Anyone know if...