Questions tagged [dynamic-language-runtime]

The Dynamic Language Runtime (DLR) from Microsoft is an ongoing effort to bring a set of services that run on top of the Common Language Runtime (CLR) and provides language services for several different dynamic languages.

The Dynamic Language Runtime (DLR) from Microsoft is an ongoing effort to bring a set of services that run on top of the Common Language Runtime (CLR) and provides language services for several different dynamic languages. These services include:

  • A dynamic type system, to be shared by all languages utilizing the DLR services
  • Dynamic method dispatch
  • Dynamic code generation
  • Hosting API

The DLR is used to implement dynamic languages like Python and Ruby on the .NET Framework. By having several dynamic language implementations share a common underlying system, it should be easier to let these implementations interact with one another. For example, it should be possible to use libraries from any dynamic language in any other dynamic language. In addition, the hosting API allows interoperability with statically typed CLI languages like C#.

Source: Wikipedia

278 questions
58
votes
4 answers

How do I express a void method call as the result of DynamicMetaObject.BindInvokeMember?

I'm trying to give a short example of IDynamicMetaObjectProvider for the second edition of C# in Depth, and I'm running into issues. I want to be able to express a void call, and I'm failing. I'm sure it's possible, because if I dynamically call a…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
53
votes
1 answer

Expression.Lambda and query generation at runtime, simplest "Where" example

I was trying to generate a simple Lambda Expression at runtime with no luck... something like this: var result = queryableData.Where(item => item.Name == "Soap") Here is my example class and a fixture queryable: public class Item { public int…
CodeAddicted
  • 979
  • 2
  • 10
  • 13
49
votes
1 answer

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…
Patrik Hägne
  • 16,751
  • 5
  • 52
  • 60
41
votes
6 answers

Dynamic Lang. Runtime vs Reflection

I am planning to use dynamic keyword for my new project. But before stepping in, I would like to know about the pros and cons in using dynamic keyword over Reflection. Following where the pros, I could find in respect to dynamic…
AbrahamJP
  • 3,425
  • 7
  • 30
  • 39
41
votes
9 answers

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…
mckamey
  • 17,359
  • 16
  • 83
  • 116
30
votes
12 answers

Iron Python : what are good uses for Iron Python

I have an affinity for python, but I work in a .NET environment, so I was looking into Iron Python, and wondering what it would be used for. Could you write an app in it? or is it for adding a scripting language to your app? How do you guys use…
Master Morality
  • 5,837
  • 6
  • 31
  • 43
26
votes
4 answers

What is the difference between CLR and DLR in C#?

What is the difference between CLR and DLR in C#? are these two concept comparable?
masoud ramezani
  • 22,228
  • 29
  • 98
  • 151
23
votes
3 answers

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…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
22
votes
2 answers

Call-site explanation?

scaning the internet , im having trouble understanding in a simple manner - the term call-site (@dlr). ive been reading here that CallSite is : one site says The location in which the method is called. one book say : call site . This is the…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
21
votes
4 answers

C#'s 'dynamic' in F#

One example of using the DLR in C# is as follows: dynamic dyn = new MyObject(); dyn.MyMethod(); //resolved at runtime what would be the equivalent in F#? Thanks.
ay.metallo
  • 815
  • 1
  • 7
  • 16
20
votes
2 answers

Code coverage, analysis and profiling for dynamically generated code

I have a demo project, which creates an assembly and uses it. I also can debug the injected code. But if I run coverage, analysis or profiling, it is counted, but I want to measure it. Code: CSharpCodeProvider codeProvider = new…
19
votes
1 answer

How to highlight dynamic code in visual studio

Is it possible and if so how, to make Visual Studio highlight dynamic expressions in code? When I just hovered above some code, visual studio told me it was a dynamic expression. This made me realize I made a mistake in my code and used one dynamic…
19
votes
1 answer

Making a CLR/.NET Language Debuggable

What are some resources for making a CLR/.NET language debuggable? I'm developing an ActionScript 3 to IL compiler, which uses DLR CallSites and CallSiteBinders to handle the dynamic aspects of the otherwise static programming language. I'm looking…
18
votes
2 answers

How can I dynamically call a method on a dynamic object?

When I want to dynamically call a statically-defined ("statically" in the sense of "determined at compile-time", not in the sense of "class-level member") method on any object in C#, I can use reflection to get a handle to that method and invoke…
zneak
  • 134,922
  • 42
  • 253
  • 328
16
votes
2 answers

How to embed lua (or some other scripting language) in a C# 5.0 application

First of all, I'd like to appoligize in advance for my English. My question is specifically about what do I need to have in a C# application to be able to interpret a Lua script fed to said application. The Lua scripts must be able to have access…
user3251430
  • 213
  • 1
  • 2
  • 10
1
2 3
18 19