<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>dlr Discussions Rss Feed</title><link>http://www.codeplex.com/dlr/Thread/List.aspx</link><description>dlr Discussions Rss Description</description><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;&lt;strong&gt;jdhardy wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;
The DLR is still sort-of actively developed, in the IronLangauges github repo. Tomas Matousek has done a bunch of work to port it to Windows8/Metro. No major work is being done, but that's mainly because it's a pretty solid piece of code that doesn't need&lt;br /&gt;
 major changes. None of that has been ported back to this project, however, since for a long time there wasn't much interest in the DLR outside of IronPython/IronRuby. I've mulled around the idea of breaking it out into its own github repo, but I'd need to&lt;br /&gt;
 know that there's enough projects using it to be worth the effort. Unfortunately DLR languages tend to start with good intentions and then fizzle out.&lt;br /&gt;
&lt;/blockquote&gt;
Speaking as someone with a language project still using parts of the DLR and not fizzling out (ClojureCLR), any updates to DLR would be welcome.  Win8/Metro has been asked for.  A separate github would be nice, but I'd be happy with an official nuget packaged of just the DLR.  Some of the folks interested in this have expressed interest that this be signed the same as the regular IronPython package, to aid in compatibility.&lt;br /&gt;
&lt;br /&gt;
-David&lt;br /&gt;
&lt;/div&gt;</description><author>dmiller</author><pubDate>Fri, 05 Apr 2013 22:10:59 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130405101059P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;IronPython and IronRuby were developed in the same TFS repo inside Microsoft, and the IronRuby team had a mirror on GitHub. after MS dumped the Iron languages, that GH repo was renamed to IronLanguages, and that's where the primary development of IronPython&lt;br /&gt;
 and IronRuby take place. Re debugging, I know that IronPython has debugging information (i.e. it can be debugged by the normal VS debugger, although PTVS improves that quite a bit), stack traces, etc. I don't know how much of it is in the DLR and how much&lt;br /&gt;
 is specific to IronPython though.&lt;br /&gt;
&lt;/div&gt;</description><author>jdhardy</author><pubDate>Thu, 04 Apr 2013 19:21:23 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130404072123P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;Hi jdhardy,&lt;br /&gt;
&lt;br /&gt;
My impression was that there was at least some development in the IronLanguages project. I've seen Windows 8 related code, and it's nice to see that people add functionality to it. Good Work (Tomas Matousek)!&lt;br /&gt;
&lt;br /&gt;
It's also my impression that large parts of the framework are stable. The whole AST/Expressions part is working well and documented reasonably, and I was surprised how easy it is to use. I am trying to implement Smalltalk on top of the DLR, and most things are straight forward. The only things I am missing is the non-local returns, i.e. returns from a full-closure out of the context where the closure is defined. However, I am sure that it's not a trivial thing to implement and probably will need some CLR/MSIL support.&lt;br /&gt;
&lt;br /&gt;
Anyway, I understand that it's not ported back here. In my opinion, it's enough to have the changes one place. Can you explain what's the purpose of the IronLanguages project? Is it to coordinate the IronPython and IronRuby projects, or is it the actual project where the IronPython and IronRuby development happens?&lt;br /&gt;
&lt;br /&gt;
For now, keep it in IronLanguages. It can always be split later.&lt;br /&gt;
&lt;br /&gt;
A completely unrelated question, do you know, or do you know where to ask if the DLR has debugging functionality? What I would like to be able to do is create stack traces of a dead/dying DLR application (my IronSmalltalk dialect). I've looked into the Python Tools for Visual Studio, bur if I understood the debugger correctly, it communicates with the Python process and contains Python code inside that process. Is that correct? Anyway, any ideas are welcome!&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
-- Todor&lt;br /&gt;
&lt;/div&gt;</description><author>todort</author><pubDate>Thu, 04 Apr 2013 06:30:33 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130404063033A</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;I'd be in favor of anything that we can do to make the DLR more accessible. I have a few languages that I would like to move over to the DLR, but this is a long term project, and it will take some time. I think that the DLR will be interesting to academics, especially as they become more documented, and more wildly known.&lt;br /&gt;
&lt;/div&gt;</description><author>dsblank</author><pubDate>Wed, 03 Apr 2013 19:01:38 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130403070138P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;The DLR is still sort-of actively developed, in the IronLangauges github repo. Tomas Matousek has done a bunch of work to port it to Windows8/Metro. No major work is being done, but that's mainly because it's a pretty solid piece of code that doesn't need&lt;br /&gt;
 major changes. None of that has been ported back to this project, however, since for a long time there wasn't much interest in the DLR outside of IronPython/IronRuby. I've mulled around the idea of breaking it out into its own github repo, but I'd need to&lt;br /&gt;
 know that there's enough projects using it to be worth the effort. Unfortunately DLR languages tend to start with good intentions and then fizzle out.&lt;br /&gt;
&lt;/div&gt;</description><author>jdhardy</author><pubDate>Wed, 03 Apr 2013 18:29:43 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130403062943P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;Thanks. I've found the blog and probably the entry you are mentioning. I did some reading earlier and found another blog and entry (I think it was a Ruby developer) on Microsoft's eternally changing policies and how this crippled the project :-/&lt;br /&gt;
&lt;br /&gt;
Well, the hosting spec is not out of date, it's just not complete. Parts of it are written as &amp;quot;To-Do&amp;quot; and looking at the code, I get the same feeling, that those were still under development.&lt;br /&gt;
&lt;br /&gt;
There was a project to create a Smalltalk on the DLR 3-4 years ago, but it didn't get off. I started another project (and took over the name &lt;a href="http://ironsmalltalk.codeplex.com/" rel="nofollow"&gt;http://ironsmalltalk.codeplex.com/&lt;/a&gt;) about 2½ years ago. Unfortunately I had to take a break for about an year, and now I am back working on it.&lt;br /&gt;
&lt;br /&gt;
So, the DLR is not developed actively any more, not even as part of the IronPython or IronRuby projects. And the PTVS is a stand-alone project.&lt;br /&gt;
&lt;br /&gt;
I'll look at the PTVS and try to see if I can figure anything out. My first goal will be to create an extension to VS to be able to see the stack-trace of IronSmalltalk project.&lt;br /&gt;
&lt;br /&gt;
Take care.&lt;br /&gt;
&lt;/div&gt;</description><author>todort</author><pubDate>Mon, 01 Apr 2013 23:33:11 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130401113311P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Fundamentally, we wanted to work toward standard python since that's what lots of people use.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Search for Jason Zander's blog on what happened to the iron languages, the full story is there. They are active and wholely owned by the community. Yes, the DLR was promising interop, and we had that with common
 hosting APIs, etc. We're not focusing on that now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Is the hosting spec really out of date? Also, there was a smalltalk started at one point, but I don't recall what happened to it. I imagine you already searched for something to start from though.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;In terms of more reading, it would be the ironpython mailing list since we do not work on this stuff now and are not updating docs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Bill&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in"&gt;
&lt;p style="margin-left:.5in"&gt;&lt;b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>billchi</author><pubDate>Mon, 01 Apr 2013 23:12:44 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130401111244P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;Thanks for the reply.&lt;br /&gt;
&lt;br /&gt;
Did I understand you correctly? The Python Tools for Visual Studio (&lt;a href="http://pytools.codeplex.com/" rel="nofollow"&gt;http://pytools.codeplex.com/&lt;/a&gt;) are based on the IronPython Studio (&lt;a href="http://ironpythonstudio.codeplex.com/" rel="nofollow"&gt;http://ironpythonstudio.codeplex.com/&lt;/a&gt;). So, why did the projects split? Different goals? &lt;br /&gt;
&lt;br /&gt;
Did the same happen to IronPython / IronRuby and IronLanguages? Are they all active? Do they still cooperate? The idea behind the DLR was to have a common shared infrastructure, so interoperation between the languages is possible. Shame if people are branching indefinitely.&lt;br /&gt;
&lt;br /&gt;
Anyway, I am trying to implement a Smalltalk dialect on top the DLR - strangely enough called IronSmalltalk. The DLR documentation is not 100% up to date. Figuring out the expression and dynamic object and code generation was doable. Figuring out the hosting frameworks was much more tricky (and I still only get the basics).&lt;br /&gt;
&lt;br /&gt;
My next task is to figure out how to write some debug tools. Ideally, I'd like to see a stack trace inside Visual Studio and being able to inspect the offending objects and code. I am currently thinking to investigate how PTVS works and if I can learn something from it.&lt;br /&gt;
&lt;br /&gt;
Can you recommend some relevant reading or what direction to go from here?&lt;br /&gt;
&lt;br /&gt;
Thanks, &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Todor&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>todort</author><pubDate>Mon, 01 Apr 2013 23:04:49 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130401110449P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;There's no current connection.  PTVS is based upon the IronPythonTools which were originally shipped w/ the IronLanguages but has changed a huge amount since then.  And I've personally worked on both, but there's no on going work that's shared between the two.&lt;br /&gt;
&lt;/div&gt;</description><author>dinov</author><pubDate>Sat, 30 Mar 2013 17:05:39 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130330050539P</guid></item><item><title>New Post: DLR &lt;&gt; IronLanguages</title><link>http://dlr.codeplex.com/discussions/438492</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
What's the relationship between this DLR project and the IronLanguages project on GitHub (&lt;a href="https://github.com/IronLanguages" rel="nofollow"&gt;https://github.com/IronLanguages&lt;/a&gt;)?&lt;br /&gt;
&lt;/div&gt;</description><author>todort</author><pubDate>Sat, 30 Mar 2013 03:17:08 GMT</pubDate><guid isPermaLink="false">New Post: DLR &lt;&gt; IronLanguages 20130330031708A</guid></item><item><title>New Post: .NET 4.5</title><link>http://dlr.codeplex.com/discussions/398992</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div dir="ltr"&gt;They do compile on 4.5, among other platforms. Check out &lt;a href="https://github.com/IronLanguages/main"&gt;
https://github.com/IronLanguages/main&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Tomas &lt;br&gt;
&lt;div&gt;
&lt;div id="SkyDrivePlaceholder"&gt;&lt;/div&gt;
&lt;hr id="stopSpelling"&gt;
From: [email removed]&lt;br&gt;
To: [email removed]&lt;br&gt;
Date: Thu, 11 Oct 2012 08:49:24 -0700&lt;br&gt;
Subject: .NET 4.5 [dlr:398992]&lt;br&gt;
&lt;br&gt;
From: Alxandr&lt;br&gt;
&lt;div id="ecxThreadNotificationPostBody"&gt;What would it take to get the the Microsoft.Scripting-projects compiling under .NET 4.5?&lt;br&gt;
&lt;/div&gt;
&lt;div id="ecxThreadNotificationFooter"&gt;Read the &lt;a href="http://dlr.codeplex.com/discussions/398992#post925328" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;br&gt;
To add a post to this discussion, reply to this email (&lt;a href="mailto:dlr@discussions.codeplex.com?subject=[dlr:398992]"&gt;dlr@discussions.codeplex.com&lt;/a&gt;)&lt;br&gt;
To start a new discussion for this project, email &lt;a href="mailto:dlr@discussions.codeplex.com"&gt;
dlr@discussions.codeplex.com&lt;/a&gt;&lt;br&gt;
You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://dlr.codeplex.com/subscriptions/thread/project/edit" target="_blank"&gt;
unsubscribe or change your settings&lt;/a&gt; on codePlex.com.&lt;br&gt;
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>TomasMatousek</author><pubDate>Fri, 12 Oct 2012 05:37:25 GMT</pubDate><guid isPermaLink="false">New Post: .NET 4.5 20121012053725A</guid></item><item><title>New Post: .NET 4.5</title><link>http://dlr.codeplex.com/discussions/398992</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;What would it take to get the the Microsoft.Scripting-projects compiling under .NET 4.5?&lt;/p&gt;
&lt;/div&gt;</description><author>Alxandr</author><pubDate>Thu, 11 Oct 2012 15:49:19 GMT</pubDate><guid isPermaLink="false">New Post: .NET 4.5 20121011034919P</guid></item><item><title>New Post: Custom Scope Storage as default for ScriptEngine.CreateScope()</title><link>http://dlr.codeplex.com/discussions/395839</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I have subsequently made the relevant changes to the DLR to implement option 1, these changes are contained within &lt;a title="Pull Request 80" href="https://github.com/IronLanguages/main/pull/80"&gt;Pull Request 80&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Changes add the following methods to LanguageContext:&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;virtual&lt;/span&gt; Scope CreateScope();
&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;virtual&lt;/span&gt; Scope CreateScope(IDictionary&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;,&lt;span style="color: blue;"&gt;object&lt;/span&gt;&amp;gt; dictionary);
&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;virtual&lt;/span&gt; Scope CreateScope(IDynamicMetaObjectProvider storage);
&lt;/pre&gt;
&lt;/div&gt;
The changes also make calls to ScriptEngine.ExecuteFile(string file) and ScriptCode.CreateScope() both reference the LanguageContext's implementation of the CreateScope method.&lt;/p&gt;&lt;/div&gt;</description><author>SPARTAN563</author><pubDate>Mon, 17 Sep 2012 20:49:31 GMT</pubDate><guid isPermaLink="false">New Post: Custom Scope Storage as default for ScriptEngine.CreateScope() 20120917084931P</guid></item><item><title>New Post: Custom Scope Storage as default for ScriptEngine.CreateScope()</title><link>http://dlr.codeplex.com/discussions/395839</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I am currently in the process of polishing a DLR Lua implementation, fixing bugs and generally getting it to a usable state, and I have hit a bit of a wall. I am trying to implement a default Scope storage which will be used when another is not specified
 (i.e. through calls to ScriptEngine.ExecuteFile) however I cannot seem to find any way to override this default behaviour for the ExecuteFile(*) methods. [It is possible to provide a CreateScope override on ScriptCode which is then called when Execute(*) methods
 are called, thus fulfilling my requirements]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Possible Solutions&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make ScriptEngine.CreateScope virtual and call _language.CreateScope from within ScriptEngine
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Advantages&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Also allows all scopes created by calls to ScriptEngine.CreateScope to make use of the default backing store, allowing languages finer control over this.
&lt;/li&gt;&lt;li&gt;If not&amp;nbsp;overridden&amp;nbsp;by a language it will revert to the current behaviour, making this a non-breaking change.
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Disadvantages&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Requires changes to the DLR source code to implement &lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;&lt;li&gt;Make ScriptEngine.ExecuteFile call _language.GetScope(file) instead of CreateScope()
&lt;em&gt;[&lt;strong&gt;Not feasible&lt;/strong&gt;: would break the ability to call ExecuteFile multiple times and have each execution&amp;nbsp;separately&amp;nbsp;boxed]&lt;/em&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;I'll add more alternatives here as I think of them, but at the moment I am tending towards the first. If anyone has any better ideas, or knows of a way I can implement this using existing functionality (without requiring the user to create a scope each time)
 then I'd appreciate it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:green"&gt;//Initialize ScriptEngine instance&lt;/span&gt;
&lt;span style="color:blue"&gt;var&lt;/span&gt; engine = Lua.CreateEngine();

&lt;span style="color:green"&gt;//ScriptEngine.CreateScope()&lt;/span&gt;
&lt;span style="color:blue"&gt;var&lt;/span&gt; scope = engine.CreateScope();
&lt;span style="color:green"&gt;//Expected: scope.Storage should be of type: LuaTable&lt;/span&gt;
&lt;span style="color:green"&gt;//Actual:   scope.Storage is of type: ScopeStorage&lt;/span&gt;

&lt;span style="color:green"&gt;//ScriptEngine.ExecuteFile(file)&lt;/span&gt;
scope = engine.ExecuteFile(file);
&lt;span style="color:green"&gt;//Expected: scope.Storage should be of type: LuaTable&lt;/span&gt;
&lt;span style="color:green"&gt;//Actual:   scope.Storage is of type: ScopeStorage&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/strong&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>SPARTAN563</author><pubDate>Mon, 17 Sep 2012 18:09:05 GMT</pubDate><guid isPermaLink="false">New Post: Custom Scope Storage as default for ScriptEngine.CreateScope() 20120917060905P</guid></item><item><title>New Post: Sympl Example - Source Code?</title><link>http://dlr.codeplex.com/discussions/389326</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;If you go to dlr.codeplex.com and click &amp;quot;source code&amp;quot; in the top nav bar, then click &amp;quot;browse&amp;quot; in the sub nav bar that's flush left, that gets you here:
&lt;a href="http://dlr.codeplex.com/SourceControl/changeset/view/54115"&gt;http://dlr.codeplex.com/SourceControl/changeset/view/54115&lt;/a&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Then click dlr_main-&amp;gt;runtime-&amp;gt;samples-&amp;gt;sympl. The python dir is an implementation in ironpython. The csharp dir is C# implementation that works with only shipping DLR .NET 4.0 bits. The csharp-cponly dir is a
 C# version that uses some features that only shipped open source on the dlr.codeplex.com site, and there are comments or a section in the doc that explains the extensions used in that version (don't recall what they were now :-)).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Cheers,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Bill&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in"&gt;
&lt;p style="margin-left:.5in"&gt;&lt;b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt; fholm [email removed]
&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Friday, July 27, 2012 10:13 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Bill Chiles&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: Sympl Example - Source Code? [dlr:389326]&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;From: fholm&lt;/span&gt;&lt;/p&gt;
&lt;div id="ThreadNotificationPostBody" style="margin-bottom:24.0pt"&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;It's in the DLR main source code dump.&lt;br clear="all"&gt;
&lt;i&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;i&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in"&gt;&lt;i&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Regards,&lt;br&gt;
Fredrik Holmström&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;On Fri, Jul 27, 2012 at 7:11 PM, yogeshshetty &amp;lt;&lt;a href="mailto:notifications@codeplex.com" target="_blank"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;From: yogeshshetty&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;I am exploring DLR runtime, and i see that there is a nice documentation on Sympl language. Does anyone know where can i find the source code for this sample project ?&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Read the &lt;a href="http://dlr.codeplex.com/discussions/389326#post892349" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:dlr@discussions.codeplex.com?subject=[dlr:389326]" target="_blank"&gt;dlr@discussions.codeplex.com&lt;/a&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;To start a new discussion for this project, email
&lt;a href="mailto:dlr@discussions.codeplex.com" target="_blank"&gt;dlr@discussions.codeplex.com&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://dlr.codeplex.com/subscriptions/thread/project/edit" target="_blank"&gt;
unsubscribe or change your settings&lt;/a&gt; on codePlex.com.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&lt;a href="http://codeplex.com" target="_blank"&gt;codeplex.com&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>billchi</author><pubDate>Fri, 27 Jul 2012 17:37:20 GMT</pubDate><guid isPermaLink="false">New Post: Sympl Example - Source Code? 20120727053720P</guid></item><item><title>New Post: Sympl Example - Source Code?</title><link>http://dlr.codeplex.com/discussions/389326</link><description>&lt;div style="line-height: normal;"&gt;It's in the DLR main source code dump.&lt;br clear="all"&gt;
&lt;i&gt;
&lt;div&gt;&lt;i&gt;&lt;br&gt;
&lt;/i&gt;&lt;/div&gt;
Regards,&lt;br&gt;
Fredrik Holmström&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;div&gt;On Fri, Jul 27, 2012 at 7:11 PM, yogeshshetty &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:notifications@codeplex.com" target="_blank"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
&lt;div&gt;
&lt;p&gt;From: yogeshshetty&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;I am exploring DLR runtime, and i see that there is a nice documentation on Sympl language. Does anyone know where can i find the source code for this sample project ?&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Read the &lt;a href="http://dlr.codeplex.com/discussions/389326#post892349" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:dlr@discussions.codeplex.com?subject=[dlr:389326]" target="_blank"&gt;dlr@discussions.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To start a new discussion for this project, email &lt;a href="mailto:dlr@discussions.codeplex.com" target="_blank"&gt;
dlr@discussions.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://dlr.codeplex.com/subscriptions/thread/project/edit" target="_blank"&gt;
unsubscribe or change your settings&lt;/a&gt; on codePlex.com.&lt;/p&gt;
&lt;p&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&lt;a href="http://codeplex.com" target="_blank"&gt;codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;</description><author>fholm</author><pubDate>Fri, 27 Jul 2012 17:12:40 GMT</pubDate><guid isPermaLink="false">New Post: Sympl Example - Source Code? 20120727051240P</guid></item><item><title>New Post: Sympl Example - Source Code?</title><link>http://dlr.codeplex.com/discussions/389326</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I am exploring DLR runtime, and i see that there is a nice documentation on Sympl language. Does anyone know where can i find the source code for this sample project ?&lt;/p&gt;
&lt;/div&gt;</description><author>yogeshshetty</author><pubDate>Fri, 27 Jul 2012 17:11:29 GMT</pubDate><guid isPermaLink="false">New Post: Sympl Example - Source Code? 20120727051129P</guid></item><item><title>New Post: Understanding how the BinaryOperationBinder works</title><link>http://dlr.codeplex.com/discussions/355421</link><description>&lt;div style="line-height: normal;"&gt;&lt;blockquote style="border: solid .1em #ccc; font-style: italic; margin: .25em 1em 0 1em; padding: 0 .25em 0 .25em;"&gt;&lt;strong&gt;billchi wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;div&gt;
&lt;p style="margin-left: .5in;"&gt;&lt;span style="font-size: 11.0pt;"&gt;&lt;br /&gt;Languages  can be smarter and can implement their own &amp;ldquo;Less than + convert to bool sites&amp;rdquo; which combine the 2 operations into a single operation. The DLR outer layer even includes the ComboBinder to automatically combine the 2 dynamic operations into a single one  given sub-binders which work correctly.&lt;/span&gt;&lt;/p&gt;
&lt;div id="ThreadNotificationPostBody" style="margin-bottom: 24.0pt;"&gt;
&lt;div id="_mcePaste"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;Can you provide a small concrete&amp;nbsp;example&amp;nbsp;of this? I'm currently implementing a language, and doing stuff like "if(a &amp;lt; b)" turns out to be a pain because of stuff like this, but even more, I've been completely unable to use&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;Utils.LightDynamic(engine.GetUnaryBinder(ExpressionType.IsTrue), valueExpr)
&lt;/pre&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;because it complains about the binder returning a bool while the callsite requires an object-result, and this is before any of my code even runs! So what seems to be the problem is that I should probably specify the call-site type-argument myself, but I've found myself unable to figure out how to do that from Expression-objects. Even conversion to bool requires an object-result because the call-site is miss-matched.&lt;/p&gt;
&lt;p&gt;What I currently do is parse my language, then hand it generate an Expression-tree, and hand a LightLambda of that delegate over to a SourceCode-object. How can I change the generation of the Expression-tree to enable stuff like this?&lt;/p&gt;&lt;/div&gt;</description><author>Alxandr</author><pubDate>Wed, 30 May 2012 19:27:22 GMT</pubDate><guid isPermaLink="false">New Post: Understanding how the BinaryOperationBinder works 20120530072722P</guid></item><item><title>New Post: Understanding how the BinaryOperationBinder works</title><link>http://dlr.codeplex.com/discussions/355421</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Thanks for the followup, and very sorry it took us a while to get back to you. I just got some insight from dev this morning since I was not sure of the answer. I won't include his text on the change you sited,
 but here's a bit of extra info that may be interesting.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Almost all of the standard dynamic operations are expected to return object – in this particular case the problem is less than can be overloaded to return non-bool values (even in static
 languages like C#). Therefore the DLR requires that you always return object. Some of the logic behind this is probably expressed in these stack overflow posts:&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;a href="http://stackoverflow.com/questions/1360097/dlr-return-type"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;http://stackoverflow.com/questions/1360097/dlr-return-type&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;a href="http://stackoverflow.com/questions/1835912/how-do-i-express-a-void-method-call-as-the-result-of-dynamicmetaobject-bindinvok/1836591#1836591"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;http://stackoverflow.com/questions/1835912/how-do-i-express-a-void-method-call-as-the-result-of-dynamicmetaobject-bindinvok/1836591#1836591&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;So this needs to be declared to return object, and then if you really want a bool you need to add a dynamic convert to bool site – but it doesn’t look like that’s needed here. Languages
 can be smarter and can implement their own “Less than &amp;#43; convert to bool sites” which combine the 2 operations into a single operation. The DLR outer layer even includes the ComboBinder to automatically combine the 2 dynamic operations into a single one given
 sub-binders which work correctly. But the core operations are always fixed to returning object (or void)&lt;/span&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Bill&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in"&gt;
&lt;p style="margin-left:.5in"&gt;&lt;b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt; fgretief [email removed]
&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Wednesday, May 16, 2012 9:29 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Bill Chiles&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: Understanding how the BinaryOperationBinder works [dlr:355421]&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p style="margin-left:.5in"&gt;&lt;/p&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;From: fgretief&lt;/span&gt;&lt;/p&gt;
&lt;div id="ThreadNotificationPostBody" style="margin-bottom:24.0pt"&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Hello DLRs,&lt;br&gt;
&lt;br&gt;
I eventually found the answer to the problem. Actually there were two issues.&lt;br&gt;
&lt;br&gt;
The first was that the ReturnType of a BinaryOperationBinder is Object. &lt;br&gt;
And my code told the Expression.Dynamic method to return binary. So replacing&lt;br&gt;
the typeof(bool) with typeof(object) fixed that issue.&lt;br&gt;
&lt;br&gt;
var binExpr = Expression.Dynamic(&lt;br&gt;
context.CreateBinaryOperationBinder(opr),&lt;br&gt;
typeof(object), left, right);&lt;br&gt;
&lt;br&gt;
The second issue was again with the BinaryOperationBinder returning an Object.&lt;br&gt;
Inside the FallbackBinaryOperation method of my binder, I made a call to the &lt;br&gt;
DefaultBinder's DoOperation() method, which return a boolean type. This was the &lt;br&gt;
reason why I added boolean to the Expression.Dynamic call in the first place. &lt;br&gt;
So we need to convert the output to the return type of the binder.&lt;br&gt;
&lt;br&gt;
public override DynamicMetaObject FallbackBinaryOperation(&lt;br&gt;
DynamicMetaObject target,&lt;br&gt;
DynamicMetaObject arg,&lt;br&gt;
DynamicMetaObject errorSuggestion)&lt;br&gt;
{&lt;br&gt;
... &lt;br&gt;
&lt;br&gt;
// original code&lt;br&gt;
//return _binder.DoOperation(Operation, left, right); &lt;br&gt;
&lt;br&gt;
// new code&lt;br&gt;
var returnType = this.ReturnType;&lt;br&gt;
var mo = context.Binder.DoOperation(Operation, left, right);&lt;br&gt;
if (mo.Expression.Type != returnType)&lt;br&gt;
{&lt;br&gt;
mo = mo.Clone(Expression.Convert(mo.Expression, returnType));&lt;br&gt;
}&lt;br&gt;
return mo;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
Now my example executes as expected.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Francois&lt;/span&gt;&lt;/p&gt;
&lt;div id="_mcePaste"&gt;
&lt;p style="margin-left:.5in"&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Hello DLRs,&lt;br&gt;
&lt;br&gt;
I eventually found the answer to the problem. Actually there were two issues.&lt;br&gt;
&lt;br&gt;
The first was that the ReturnType of a BinaryOperationBinder is Object. &lt;br&gt;
And my code told the Expression.Dynamic method to return binary. So replacing&lt;br&gt;
the typeof(bool) with typeof(object) fixed that issue.&lt;br&gt;
&lt;br&gt;
var binExpr = Expression.Dynamic(&lt;br&gt;
context.CreateBinaryOperationBinder(opr),&lt;br&gt;
typeof(object), left, right);&lt;br&gt;
&lt;br&gt;
The second issue was again with the BinaryOperationBinder returning an Object.&lt;br&gt;
Inside the FallbackBinaryOperation method of my binder, I made a call to the &lt;br&gt;
DefaultBinder's DoOperation() method, which return a boolean type. This was the &lt;br&gt;
reason why I added boolean to the Expression.Dynamic call in the first place. &lt;br&gt;
So we need to convert the output to the return type of the binder.&lt;br&gt;
&lt;br&gt;
public override DynamicMetaObject FallbackBinaryOperation(&lt;br&gt;
DynamicMetaObject target,&lt;br&gt;
DynamicMetaObject arg,&lt;br&gt;
DynamicMetaObject errorSuggestion)&lt;br&gt;
{&lt;br&gt;
... &lt;br&gt;
&lt;br&gt;
// original code&lt;br&gt;
//return _binder.DoOperation(Operation, left, right); &lt;br&gt;
&lt;br&gt;
// new code&lt;br&gt;
var returnType = this.ReturnType;&lt;br&gt;
var mo = context.Binder.DoOperation(Operation, left, right);&lt;br&gt;
if (mo.Expression.Type != returnType)&lt;br&gt;
{&lt;br&gt;
mo = mo.Clone(Expression.Convert(mo.Expression, returnType));&lt;br&gt;
}&lt;br&gt;
return mo;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Francois&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>billchi</author><pubDate>Wed, 16 May 2012 16:32:40 GMT</pubDate><guid isPermaLink="false">New Post: Understanding how the BinaryOperationBinder works 20120516043240P</guid></item><item><title>New Post: Understanding how the BinaryOperationBinder works</title><link>http://dlr.codeplex.com/discussions/355421</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hello DLRs,&lt;br /&gt;&lt;br /&gt;I eventually found the answer to the problem. Actually there were two issues.&lt;br /&gt;&lt;br /&gt;The first was that the ReturnType of a BinaryOperationBinder is Object. &lt;br /&gt;And my code told the Expression.Dynamic method to return binary. So replacing&lt;br /&gt;the typeof(bool) with typeof(object) fixed that issue.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; var binExpr = Expression.Dynamic(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context.CreateBinaryOperationBinder(opr),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeof(object), left, right);&lt;br /&gt;&lt;br /&gt;The second issue was again with the BinaryOperationBinder returning an Object.&lt;br /&gt;Inside the FallbackBinaryOperation method of my binder, I made a call to the &lt;br /&gt;DefaultBinder's DoOperation() method, which return a boolean type. This was the &lt;br /&gt;reason why I added boolean to the Expression.Dynamic call in the first place. &lt;br /&gt;So we need to convert the output to the return type of the binder.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public override DynamicMetaObject FallbackBinaryOperation(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicMetaObject target,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicMetaObject arg,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicMetaObject errorSuggestion)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // original code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return _binder.DoOperation(Operation, left, right); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // new code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var returnType = this.ReturnType;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mo = context.Binder.DoOperation(Operation, left, right);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mo.Expression.Type != returnType)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mo = mo.Clone(Expression.Convert(mo.Expression, returnType));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return mo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;Now my example executes as expected.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;Regards,&lt;br /&gt;&amp;nbsp; Francois&lt;/p&gt;
&lt;div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"&gt;Hello DLRs,&lt;br /&gt;&lt;br /&gt;I eventually found the answer to the problem. Actually there were two issues.&lt;br /&gt;&lt;br /&gt;The first was that the ReturnType of a BinaryOperationBinder is Object. &lt;br /&gt;And my code told the Expression.Dynamic method to return binary. So replacing&lt;br /&gt;the typeof(bool) with typeof(object) fixed that issue.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; var binExpr = Expression.Dynamic(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context.CreateBinaryOperationBinder(opr),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeof(object), left, right);&lt;br /&gt;&lt;br /&gt;The second issue was again with the BinaryOperationBinder returning an Object.&lt;br /&gt;Inside the FallbackBinaryOperation method of my binder, I made a call to the &lt;br /&gt;DefaultBinder's DoOperation() method, which return a boolean type. This was the &lt;br /&gt;reason why I added boolean to the Expression.Dynamic call in the first place. &lt;br /&gt;So we need to convert the output to the return type of the binder.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public override DynamicMetaObject FallbackBinaryOperation(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicMetaObject target,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicMetaObject arg,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DynamicMetaObject errorSuggestion)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // original code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return _binder.DoOperation(Operation, left, right); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // new code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var returnType = this.ReturnType;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mo = context.Binder.DoOperation(Operation, left, right);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mo.Expression.Type != returnType)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mo = mo.Clone(Expression.Convert(mo.Expression, returnType));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return mo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Regards,&lt;br /&gt;&amp;nbsp; Francois&lt;/div&gt;&lt;/div&gt;</description><author>fgretief</author><pubDate>Wed, 16 May 2012 16:28:42 GMT</pubDate><guid isPermaLink="false">New Post: Understanding how the BinaryOperationBinder works 20120516042842P</guid></item></channel></rss>