dynamic-language-runtime

How does the DLR work?

吃可爱长大的小学妹 提交于 2019-11-30 09:18:07
.Net 4 will have the a DLR (Dynamic Language Runtime). I know that it will be used for things like Iron Python and Iron Ruby. But is that all it's good for? How is the DLR useful? How does the DLR work? It is useful for allowing developers to build a dynamic language more easily, compatibility between a dynamic language and CLR and dynamic languages(built on the DLR) with each other. The DLR is built on top CLR and as such you will be able to access other .Net libraries. Multiple language support enables you to pick the right language for the right task. The DLR allows developers to more

Will .Net 4.0 include a new CLR or keep with version 2.0

只谈情不闲聊 提交于 2019-11-30 09:10:06
问题 Will .Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS team appear to be releasing more and more info on VS10 and .Net 4.0 so this may very soon not be the case. (Info available here -> http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx) 回答1: 4.0 is going to be another side

Why do I get this .NET error - “TypeError: expected List[DataPoint], got List[DataPoint]”

拥有回忆 提交于 2019-11-29 17:59:45
I refactored some code, and now I get this error when calling a function. But everything seems to be fine, I even compared failing_argument.GetType().AssemblyQualifiedName between the old and the new code and they are the same. Any ideas what could be wrong? The invocation of the function is in IronPython code, the function is in C# code (an assembly which didn't change during this refactoring). What sort of thing could generate this error? EDIT: full IronPython traceback: Traceback (most recent call last): File "D:\Work\Framework\python\ide\tab_manager.py", line 57, in add_chart_tab chart_tab

How does the DLR work?

雨燕双飞 提交于 2019-11-29 14:05:41
问题 .Net 4 will have the a DLR (Dynamic Language Runtime). I know that it will be used for things like Iron Python and Iron Ruby. But is that all it's good for? How is the DLR useful? How does the DLR work? 回答1: It is useful for allowing developers to build a dynamic language more easily, compatibility between a dynamic language and CLR and dynamic languages(built on the DLR) with each other. The DLR is built on top CLR and as such you will be able to access other .Net libraries. Multiple

Will .Net 4.0 include a new CLR or keep with version 2.0

烈酒焚心 提交于 2019-11-29 13:12:16
Will .Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS team appear to be releasing more and more info on VS10 and .Net 4.0 so this may very soon not be the case. (Info available here -> http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx ) 4.0 is going to be another side by side release from what I have read. http://blogs.msdn.com/wenlong/archive/2008/09/07/net-4-0-wf-wcf-and

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

你。 提交于 2019-11-29 09:24:32
问题 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 it is stable and meets the requriements below. We are interested in upgrading off of a script host which uses the Microsoft JScript engine and ActiveScript APIs

F# dynamic object access

人盡茶涼 提交于 2019-11-28 21:29:42
Is there a way to access DLR object (eg. DynamicObject subclass instance) members (properties and methods) in F# that is similar to C# dynamic ? There is a module now on nuget that uses the dlr to implement the dynamic operator. FSharp.Interop.Dynamic It has several advantages over a lot of the snippets out there. Performance it uses Dynamitey for the dlr call which implements caching and is a PCL library Handles methods that return void, you'll get a binding exception if you don't discard results of those. The dlr handles the case of calling a delegate return by a function automatically, this

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

大城市里の小女人 提交于 2019-11-28 17:23:32
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 void method using the reflection binder, all is fine. Here's a short but complete example: using System; using System.Dynamic; using System.Linq.Expressions; class DynamicDemo : IDynamicMetaObjectProvider { public DynamicMetaObject GetMetaObject(Expression expression) { return new MetaDemo(expression, this); } public void TestMethod(string name) {

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

泄露秘密 提交于 2019-11-28 15:43:56
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 that I've ever been able to run script on. Here's what I know about already: MSScriptControl ActiveX Control : AFAIK, this was Microsoft's last real ECMAScript-compliant implementaiton (runs JScript 5.7). I've integrated with MSScriptControl but don't consider

Expression Tree Copy or Convert

对着背影说爱祢 提交于 2019-11-28 07:41:05
How to convert a ExpressionTree of form Expression<Func<POCO1, bool>> exp = p => p.Age > 50; to Expression<Func<POCO2, bool>> exp2 = p => p.Age > 50; where POCO1 and POCO2 are C# objects and both have Int32 Age property well, you can make custom expression visitor that will replace parameter references and patch member access expressions class Converter<TTo> { class ConversionVisitor : ExpressionVisitor { private readonly ParameterExpression newParameter; private readonly ParameterExpression oldParameter; public ConversionVisitor(ParameterExpression newParameter, ParameterExpression