dlr

Where can you download Managed JScript for the DLR?

The lastest release (0.9 Stable) of the Dynamic Language Runtime contains IronPython and IronRuby, but it doesn't contain Managed JScript. Does anyone know where I can download the latest release of Managed JScript for use with ASP.NET and/or WPF? In case you aren't aware, JScript.NET and Managed JScript are too different things. What ...

IronPython - JSON choices

What is the best way to deal with JSON in IronPython 2.0.1. The native Python "standard library" json looks to be not implemented yet. If I wanted to use the Newtonsoft Json.NET library how do I do this? I could add the assembly to the GAC, but what are my other choices? ...

What dynamic language can I use for .NET unit tests?

I am trying to write some complicated acceptance tests for my C# code. I notice that when I am writing my tests I am doing a lot of explicit casting to satisfy the C# compiler. I like the type-safety I get in my production code with a statically-typed language like C#, but for my tests I would be happy to use a dynamically-typed language...

Is DLR 0.9 supported by Microsoft in a production environment

I know that DLR will be released together with C# 4.0, but I don't know when that will happen. In the meantime if somebody wants to use DLR in a production environment (nothing hardware-real-time-system), should he/she consider postponing it until C# 4.0 comes out? What I'm asking: is the existing version 0.9 supported by Microsoft? ...

Ambigious reference for ExtensionAttribute when using Iron Python in Asp.Net

I get the following error when starting an Asp.Net site that uses an assembly that in turn makes use of the dlr and Iron Python for scripting. BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. The issue seems to be known and there's a workaround in the issue tracker. However it says tha...

Using delegate/DLR Lambdas to override instance methods?

Hi all- In an effort to learn F# and .Net, I've been playing around with the to-be-released DLR. To that end, I've been playing around with reflection, in an effort to implement a basic type system that integrates nicely with the clr. While I'm able to instantiate a simple type that extends Object, I get an error when calling the me...

How do I make a LINQ expression to call a method?

I've been playing around with the DLR a bit and am a bit stuck on calling methods. For example, suppose I want to make an expression to push something onto a stack: class StackInfo{ protected Stack<SomeClass> _stack; public Expression Push(SomeClass item) { MethodInfo mi = _stack.GetType().GetMethod("Push"); ...

What's the best source of information on the DLR (.NET 4.0 beta 1)?

I'm currently researching the 2nd edition of C# in Depth, and trying to implement "dynamic protocol buffers" - i.e. a level of dynamic support on top of my existing protocol buffer library. As such, I have a DlrMessage type derived from DynamicObject. After a little bit of playing around I've managed to get it to respond to simple proper...

Can JScript.NET be used to script a .NET application?

Since MS appears to have killed Managed JavaScript in the latest DLR for both server-side (ASP.NET Futures) and client-side (Silverlight), has anyone successfully used non-obsolete APIs to allow scripting of their application objects with JScript.NET and/or can explain how to do so? A Mono/JScript solution might also be acceptable, if i...

What is the difference between Converting and Unboxing?

In the DLR's LINQ Expressions, what is the difference between this: Expression.Convert(SomeVariableExpression, typeof(T)); and this: Expression.Unbox(SomeVariableExpression, typeof(T)); The documentation on this seems a bit sketchy. And more to the point, which one of these is equivalent to this C# code: (ClassA)InstanceOfClassB ...

Overload Resolution in C# 4.0 using dynamic types

I don't have access to the C# 4.0 preview yet. But I am curious, what does the C# 4.0 runtime do when invoking an overloaded method in the following case. Does it resolve to the generic overload ... or the specialized overload. public class Foo<T> { protected string BarImpl( T value ) { return "Bar(T) says: " + value.ToString(); } ...

Execution JScript in SilverlIght Application

Hello! I try to make scriptable application using Silverlight DLR. When I try execute JScript code which contains two or more lines of code, execution only first line. For example: I had Compiled SL application written on С#. Main page contains Label named "lblMessage" and Button with Click event handler. private void Button_Click(obj...

Is it possible to load and execute C# snippets using DLR?

The majority of material I have found regarding DLR is related to IronPython. Can you parse and execute C# using DLR? If so is there over head that would prevent you from attempting this on a web server with about 30 users? More specifically I would like to script the configuration of my workflow objects when a user first initiates a ...

What are the limitations of Dynamic Language Runtime in .NET 4.0?

I know that anonymous functions are not supported as arguments to a dynamic method call. What are other such limitations of DLR in .NET 4.0? ...

What are the main advantages of switching to DLR for my scripting language?

I have written a DSL using Antlr to generate a lexer and parser from my grammar file. The parser generates an abstract syntax tree which contains various nodes (e.g. a function node) which I can calculate. In the code for the function nodes I take care of binding - checking function names and parameter types for matches from a library of...

How to use DLR with MEF in .Net 4.0?

There were promises from the MEF team that MEF will support DLR plugins in the .Net 4.0. Did it happen already and I can [Import] some IronPython objects? If yes, any links to the topic would be helpful. ...

Are there any .NET CLR/DLR implementations of ECMAScript?

Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR? Ideally something like what Rhino is for Java. A solid port of Rhino running on .NET Framework / Mono Framework would be perfect. I've only seen a handful of projects mentioned but never seen any come to light or in reality anything tha...

Does the DLR or better Iron Python run in Silverlight?

Does the DLR or even better Iron Python run in Silverlight? ...

Is it possible to halt a running DLR/IronPython/IronRuby script

I have an application that executes user generated IronRuby scripts where each thread executes on its own thread. The issue I have is that certain events can occur that require the IronRuby script to be stopped at an arbitrary point in the script. I can do it by aborting the thread the script is running on but that approach has introdu...

PowerShell Runspace vs DLR

With the .NET 4.0 beta now available, and thus the wider availability of the .NET Dynamic Language Runtime, I guess these kinds of topics are going to become "hotter". I'm confused about the conceptual differences between the DLR and PowerShell. It seems to me that if I want to provide scripting capabilities in my .NET app, I can use...