Dynamic Language Runtime: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 23 templates: hyphenate params (27×);
Bender the Bot (talk | contribs)
m Architecture: HTTP to HTTPS for Blogspot
 
(20 intermediate revisions by 9 users not shown)
Line 7:
| developer = [[.NET Foundation]]
| released = {{Start date and age|2010|04|16}}
| latest release version = 1.3.0{{wikidata|property|reference|edit|P548=Q2804309|P348}}
| latest release date = {{Start date and age|2020|11|16}}<ref name="releases">{{cite web wikidata|title=Releases qualifier|url=https://github.com/IronLanguages/dlr/releases mdy|departmentP548=IronLanguages/dlr Q2804309|website=[[GitHub]] P348|access-date=2020-11-30P577}}}}</ref>
| latest preview version =
| latest preview date =
| repo = {{URL|https://github.com/IronLanguages/dlr}}
| programming language = [[C Sharp (programming language)|C#]]
| operating system = [[Microsoft Windows|Windows]], [[macOS]], [[Linux]] ([[Debian]], [[Ubuntu (operating system)|Ubuntu]])
Line 27 ⟶ 26:
The DLR is used to implement dynamic languages on the [[.NET Framework]], including the [[IronPython]] and [[IronRuby]] projects.
 
Because the dynamic language implementations share a common underlying system, it should be easier for them to interact with one another. For example, it should be possible to use [[Library (computing)|libraries]] from any dynamic language in any other dynamic language. In addition, the hosting API allows interoperability with statically typed [[list of CLI languages|CLI languages]] like [[C Sharp (programming language)|C#]] and [[Visual Basic .NET]].
 
==History==
Line 43 ⟶ 42:
}}</ref>
 
Microsoft shipped .NET DLR 0.9 beta in November 2008,<ref>{{Cite web|url=http://www.codeplex.com/dlr|title=CodePlex Archive}}</ref> and final 0.9 in December 2008. Version 1.0 shipped in April 2010. In July 2010, Microsoft changed the license of the DLR from the [[Shared source#Microsoft Public License (Ms-PL)|Microsoft Public License]] to the [[Apache License 2.0]].<ref>{{Cite web|url=http://dlr.codeplex.com/license|title=CodePlex Archive|access-date=2010-07-27|archive-date=2011-08-14|archive-url=https://web.archive.org/web/20110814193029/http://dlr.codeplex.com/license|url-status=dead}}</ref> With the release of [[.NET 4]], also in April 2010, DLR was incorporated into the .NET Framework itself.<ref>{{cite web | url=https://msdn.microsoft.com/en-us/library/dd233052.aspx | title=Dynamic Language Runtime Overview - .NET Framework | date=30 March 2024 }}</ref>
 
The open source DLR project hosted on [[GitHub]] has a few additional features for language implementers. After the July 2010 release, there was little activity on the project for some years. This was interpreted by a Microsoft developer who worked on [[IronRuby]] as a lack of commitment from Microsoft to dynamic languages on the .NET Framework.<ref>{{cite web
Line 59 ⟶ 58:
| access-date = 2012-02-26}}</ref> However, there has been regular activity since 2016/17, leading to a number of improvements and upgrades.
 
==Language implementations==
==Supported languages==
TheIn DLR2007, servicesMicrosoft areinitially currentlyplanned usedto inuse the developmentDLR versionfor the ofupcoming [[IronRuby]],Visual aBasic .NET#2010 implementation(VB of10.0)|Visual theBasic [[Ruby2010 (programmingVB language10.0)|Ruby]] language, and for[[JScript|Managed JScript]] ([[IronPythonECMAScript]] 3.0) as well as Python and Ruby.<ref name="announce"/><ref name="Managed JScript announced">{{cite web
| url = http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx
|last=Hugunin|first=Jim
| title = A Dynamic Language Runtime (DLR)
|quote=''For the short term, our focus is on using a small number of languages to drive the first wave of DLR development where we can work closely and face-to-face with the developers in order to iron out the worst kinks in the DLR design. After this initial phase, we want to reach out to the broader language community.''
| access-date = 2007-06-21 }}</ref>
 
In 2007, Microsoft planned to use the DLR for the upcoming [[Visual Basic .NET#2010 (VB 10.0)|Visual Basic 2010 (VB 10.0)]] and [[JScript|Managed JScript]] ([[ECMAScript]] 3.0).<ref name="Managed JScript announced">{{cite web
| url = http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx
| title = Managed JScript announced
| access-date = 2007-05-04}}</ref><ref>{{cite web
| url = http://www.panopticoncentral.net/archive/2007/05/01/20383.aspx
| title = What the heck is "VBx"?
| date = 2007-05-01
| quote = ''With the new DLR, we have support for IronPython, IronRuby, Javascript, and the new dynamic VBx compile''
| access-date = 2009-08-12}}</ref><ref>{{cite web
| archive-date = 2009-05-1125
| archive-url = https://web.archive.org/web/20090525130300/http://panopticoncentral.net/archive/2007/05/01/20383.aspx
| url-status = dead
}}</ref><ref>{{cite web
| url = http://www.hanselman.com/blog/PuttingMixSilverlightTheCoreCLRAndTheDLRIntoContext.aspx
| title = Putting Mix, Silverlight, the CoreCLR and the DLR into context
Line 85 ⟶ 81:
| date=2007-05-04
| quote=''VB 10 takes advantage of a Silverlight feature called the Dynamic Language Runtime or DLR''
| access-date = 2009-08-12}}</ref> However, as of August 2009, Microsoft has no more plans to implement Managed JScript on the DLR.<ref>{{cite web
 
| url = http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121
The DLR work on Ruby and Python resulted in [[IronRuby]], a .NET implementation of the [[Ruby (programming language)|Ruby]] language, and [[IronPython]].<ref name="announce">{{cite web
|last=Chiles|first=Bill
| url = http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx
| title = Future of Managed JScript (IronJScript)?
|last=Hugunin|first=Jim
|quote=''The DLR JScript was experimental for informing the design of the DLR (expression trees, interop, callsites, hosting, etc.). The JS we released with asp futures and the Silverlight dynamic sdk became very old and unserviceable as the DLR continued evolving for release in CLR 4.0. Unfortunately, there are no plans at this time to develop and release a DLR-hostable JScript.''
| title = A Dynamic Language Runtime (DLR)
| date=2009-06-01
|quote=''For the short term, our focus is on using a small number of languages to drive the first wave of DLR development where we can work closely and face-to-face with the developers in order to iron out the worst kinks in the DLR design. After this initial phase, we want to reach out to the broader language community.''
| access-date = 2009-08-12}}</ref> Like [[C Sharp (programming language)|C#]], Visual Basic can access objects from dynamic languages built on the DLR such as [[IronPython]] and [[IronRuby]].<ref>{{cite web
| access-date = 2007-06-21 }}</ref>
 
By August 2009, Microsoft had announced it had no more plans to implement Managed JScript on the DLR.<ref>{{cite web
| url = http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121
|last = Chiles
|first = Bill
| title = = Future of Managed JScript (IronJScript)?
|quote = ''The DLR JScript was experimental for informing the design of the DLR (expression trees, interop, callsites, hosting, etc.). The JS we released with asp futures and the Silverlight dynamic sdk became very old and unserviceable as the DLR continued evolving for release in CLR 4.0. Unfortunately, there are no plans at this time to develop and release a DLR-hostable JScript.''
| date = 2009-06-01
| access-date = 2009-0708-26}}</ref>12
|archive-date = 2009-08-31
|archive-url = https://web.archive.org/web/20090831184901/http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121
|url-status = dead
}}</ref> Fredrik Holmström later independently contributed a JavaScript implementation for the DLR which he dubbed "IronJS" in the naming tradition of IronPython and IronRuby.
 
| access-date = 2009-08-12}}</ref> Like [[C Sharp (programming language)|C#]], Visual Basic can access objects from dynamic languages built on the DLR such as [[IronPython]] and [[IronRuby]].<ref>{{cite web
| url = https://msdn.microsoft.com/en-us/library/we86c8x2%28VS.100%29.aspx
| title = What's New in Visual Basic 2010
Line 97 ⟶ 109:
| publisher=[[Microsoft]]
| quote=''Visual Basic binds to objects from dynamic languages such as IronPython and IronRuby''
| access-date = 2009-08-12}}</ref><ref>{{cite web | url=https://msdn.microsoft.com/en-us/library/ee461504.aspx#Y480 | title=Walkthrough: Creating and Using Dynamic Objects (C# and Visual Basic) | date=25 February 2023 }}</ref>
 
[[PowerShell]] 3.0, released in [[Windows 8]], was updated to use the DLR.<ref>{{cite web |url= http://huddledmasses.org/powershell-3-finally-on-the-dlr |title= ArchivedPowerShell copy3 – Finally on the DLR! |access-date= 2012-03-30 |url-status=dead |archive-url=https://web.archive.org/web/20120428191707/http://huddledmasses.org/powershell-3-finally-on-the-dlr/ |archive-date= 2012-04-28 }}</ref>
 
[[IronScheme]], a [[Scheme (programming language)|Scheme]] implementation,<ref>{{Cite web|url=http://www.codeplex.com/IronScheme|title = CodePlex Archive}}</ref> was planning to build upon the DLR. This idea was abandoned because the DLR [[Branching (software)|branch]] used by the project became out of sync with the [[Trunk (software)|trunk]], and also because (according to the project coordinator) the current version of the DLR at that time could not support the majority of Scheme's requirements.<ref>{{cite web
| url = http://ironscheme.codeplex.com/Thread/View.aspx?ThreadId=55925
|archive-url = https://archive.today/20130119115406/http://ironscheme.codeplex.com/Thread/View.aspx?ThreadId=55925
| title = Is there any silverlight sample?
|url-status = dead
|quote=''Unfortunately, my DLR branch is very out of sync with the Silverlight one. I just thought about it, perhaps I do not need the DLR perse, will investigate. The problem is that the DLR as-is, is not good enough to support the majority of the Scheme's requirements''
|archive-date = January 19, 2013
| date=2009-05-11
| title = Is there any silverlight sample?
| access-date = 2009-07-26}}</ref>
|quote = ''Unfortunately, my DLR branch is very out of sync with the Silverlight one. I just thought about it, perhaps I do not need the DLR perse, will investigate. The problem is that the DLR as-is, is not good enough to support the majority of the Scheme's requirements''
|date = 2009-05-11
|access-date = 2009-07-26
}}</ref>
 
==Architecture==
Line 116 ⟶ 132:
| date = 2007-05-15
| access-date = 2008-02-23}}</ref> This architecture is backed by the idea that the number of elementary language constructs that would have to be implemented on the generic stack should be inherently limited.<ref>{{cite web
| url = httphttps://headius.blogspot.com/2008/01/langnet-2008-day-1-thoughts.html
| title = Lang.NET 2008: Day 1 Thoughts
| last=Nutter|first=Charles
Line 123 ⟶ 139:
| access-date = 2008-02-23}}</ref> The DLR [[Metadata (CLI)#Reflection|dynamically generates]] code corresponding to the functionality expressed by these nodes. The compiler for any dynamic language implemented on top of the DLR has to generate DLR abstract trees, and hand it over to the DLR libraries.
 
The DLR provides dynamically- updated <code>DynamicSite</code> objects that cache the task of binding methods to objects. Since the type of an object—as well as the members it contains—in dynamic languages can change during a program lifetime, a method invocation must check the method list to see if the invocation is a valid one. <code>DynamicSite</code> objects represent and cache the state of the object and its methods; any update to the object is reflected in the <code>DynamicSite</code> objects as well. DLR routes all method invocations via the <code>DynamicSite</code> objects, which then performs a fast lookup and [[name binding|binding]] of the method with the actual implementation.<ref>{{cite web | url = http://msdn2.microsoft.com/en-us/magazine/cc163344.aspx | title = CLR Inside Out: IronPython and the Dynamic Language Runtime | publisher = [[MSDN]] Magazine | author = Bill Chiles | date = October 2007 | access-date = 2007-08-10}}</ref>
 
In contrast to other efforts like the [[Parrot virtual machine]] (with no dependencies) or [[Da Vinci Machine]] (built on Java's [[JVM]] by adding new bytecodes in the [[Java bytecode|JVM instruction set]]), the DLR is built on top of the existing [[Common Language Runtime]], the [[.NET Framework]] virtual machine.<ref>{{cite web
Line 156 ⟶ 172:
 
==External links==
{{Wikibooks|.NET Development Foundation}}
{{Github|https://github.com/IronLanguages/dlr}}
*{{Official website|https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/dynamic-language-runtime-overview|Dynamic Language Runtime Overview}}
| repo = *{{URLGithub|https://github.com/IronLanguages/dlr}}
 
{{.NET Framework}}
{{Microsoft FOSS}}
 
[[Category:.NET Framework terminology]]
[[Category:.NET Framework software]]
[[Category:Free and open-source software]]
[[Category:Microsoft application programming interfaces]]