Monday, June 15, 2009

The 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

Silverlight DLR is implemented on top of the CLR to allow both compilation and execution of dynamic code in runtime.
Without DLR, only the already-compiled code can execute. The good thing about DLR is that it can compile and execute code in Dynamic VB.NET, IronPython, IronRuby and Managed JScript—C# is not supported by the DLR yet—at a blazingly fast performance, as the dynamic code is first JIT-compiled before being executed. With DLR, we can now write dynamic code that can fully interact with Silverlight elements at runtime.
Supports the dynamic compilation and execution of scripting languages such as JavaScript and IronPython to program Silverlight-based applications. Includes a pluggable model for adding support for other languages for use with Silverlight.
  • The Silverlight Dynamic Languages SDK provides a bridge between Silverlight and the Dynamic Language Runtime (DLR). The SDK allows developers to use dynamic languages, running on the DLR, to build Silverlight applications. With this interoperation, dynamic languages can leverage the feature-rich Silverlight Framework Class Library (FCL), and dynamic languages can call into other dynamic languages, e.g., IronPython calling Managed JScript.
    The SDK also includes services to build new languages on top of the DLR, including a shared, dynamic type system and a language hosting model. It also facilitates hosting dynamic languages inside of different hosts. Silverlight can be viewed as "simply an application host used to host the DLR," using the same services that can be utilized by an application developer.
    To get started writing Silverlight applications in IronRuby, IronPython or Managed JScript, download the Silverlight Dynamic Languages SDK, which includes:
  • IronPython, IronRuby, and Managed JScript language libraries
  • Chiron, a dynamic language development utility
    source code for IronPython, IronRuby, the Dynamic Language Runtime (DLR), and Chiron sample applications for both Ruby and Python
  • batch file used to run sample on Windows
  • shell script to run applications on Mac
  • Microsoft® Public License (Ms-PL)

1 comment:

  1. What do you mean "C# is not supported by the DLR yet"?

    The DLR is written in C#, DLR languages interact well with C# and C# is not a dynamic language so it doesn't make *sense* to run C# *on* the DLR...

    ReplyDelete