Unfortunately you're going to need another DLR language in order to demonstrate that. This refresh only includes IronPython so there isn't much to see there (as the previously released JS bits won't run against it). Here's some sample code of how it would work if you had a 2nd language and that 2nd language happened to be JavaScript:
CompiledCode pyCode = new SourceCodeUnit(PY, "def pyf(): return 42").Compile(); CompiledCode jsCode = new SourceCodeUnit(JS, "function jsf() { return pyf(); } ").Compile(); IScriptModule sm = _env.CreateModule("test", pyCode, jsCode); sm.Execute(); Assert(sm.VariableExists("pyf"), "python function not defined"); Assert(sm.VariableExists("jsf"), "JavaScript function not defined"); object x = PythonCalls.Call(sm.LookupVariable("pyf")); AreEqual(x, 42); object y = JSCall(sm, "jsf"); AreEqual(y, 42); Where "PY" == an instance of PythonEngine and JS is an instance of JavaScript's ScriptEngine. Basically this is compiling some code in both JS & VB, putting that code into one shared module (so they have the same set of global variables), and then executing the code. This is more or less what the DLR console does to enable multiple language support. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? Sent: Sunday, July 01, 2007 5:54 PM To: 'Discussion of IronPython' Subject: Re: [IronPython] IronPython v2.0 Alpha 2 Released! Hi, Dino: Thanks for your hard work! I noticed that the demos showed on MIX'07 about multiple script language share data and functions, can you give us a example to do that using new release. Thanks. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Djordjevski Sent: Saturday, June 30, 2007 05:52 To: Discussion of IronPython Subject: Re: [IronPython] IronPython v2.0 Alpha 2 Released! Hi Dino, Congrats on the new release! Can you give us an update on the status of the multiple engine debate and does this release change anything on that front? When Alpha 1 was released, we discussed swappable SystemStates as an alternative to multiple engine instances. Does this release include this functionality? Thanks, Tony Dino Viehland wrote: > Hello IronPython Community, > > We have just released IronPython 2.0 Alpha 2. This release is a snapshot of the on-going progress with IronPython 2.0 and the DLR. > One of the most significant changes in this release is the removal of Microsoft.Scripting.Vestigial. Previously this DLL was a combination of both IronPython support code as well as portions of the DLR. With Alpha 2 Microsoft.Scripting.dll contains all portions of the DLR and IronPython.dll contains the IronPython implementation which builds upon the DLR. This should help consumers of the DLR to better understand the public surface area. Being early in the product cycle this surface area may still change significantly but there are now bright lines between what DLR code is and what IronPython code is. > > IronPython also continues to use the underlying concepts of the DLR more and more. In the Alpha 1 release there were numerous locations where IronPython would use DynamicSites but fallback to runtime lookups because the site couldn't perform optimally. In this release we've continued to flush out these corner cases and improve IronPython's support for generating proper rules when using DynamicSites. We've also improved the shared infrastructure the DLR provides for creating rules and moved IronPython to this shared infrastructure. > > Significant changes in the DLR include the removal of Microsoft.Scripting. Vestigial, continued refinement of the AST and dynamic site support, and replacement of the old IDynamicObject with the new IDynamicObject. IronPython has also been updated to use more of the DLR concepts. > The DLR also continues to be expanded and improved. The DLR AST has been improved with support for more static constructs such as simple exception handling constructors and better variable support. The DLR AST factory methods have also been moved to a static Ast class to enable easier construction of ASTs. There have also been some additional convenience methods added to various nodes to make construction even easier still. Finally the DLR also has been improved to support an arbitrary number of arguments inside a DynamicSite which helps to enable calling all functions in an optimized manner. > > One of the most significant (although fairly small) improvements is the introduction of the IDynamicObject interface under its proper name. In the Alpha 1 release this interface was temporarily named IActionable because IronPython had previously shipped with an IDynamicObject interface. In this new release the old interface has been completely removed and the DLR now provides the correct IDynamicObject interface. This interface lives at the heart of the DLR so it's noteworthy that it's now found its final home. > > Note: Due to dependencies upon APIs that are not present in Silverlight 1. 1 Alpha (released at MIX) you won't be able to re-build this release for use with Silverlight. As both products stabilize more we expect better compatibility between releases. > > You can download IronPython v2.0 at: > http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?Releas > eId=5246 > > _______________________________________________ > users mailing list > users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com