I''m looking for some basic information on the DLR and I hoped this would be a good place to get answers, or pointers to other resources. My questions / understandings are: - If I am writing a language targeted for the CLR, I use System.Reflection.Emit to create IL. Is there "IL" for the DLR? - Is DLR code generated? Or is part of the "hosting" that it''s interpreted during runtime, and doesn''t have a codegen aspect? - Is Microsoft.Scripting.Host the core of the DLR? Is there a "Official" release of that ( I noticed at one time that IronPython and IronRuby were using different versions) - What is the relationship between Microsoft''s DLR support and the various language projects efforts (Where does MS DLR stop and other languages start). Any help is greatly appreciated! -- Greg Akins Software Development Manager SSI Services http://kc.vanadium.com http://www.pghcodingdojo.org http://www.insomnia-consulting.org/monologue
Greg Akins:> - If I am writing a language targeted for the CLR, I use > System.Reflection.Emit to create IL. Is there "IL" for the DLR?There are expression trees. You generate an expression tree and we either transform them into IL or interpret them depending on the context.> - Is DLR code generated? Or is part of the "hosting" that it''s > interpreted during runtime, and doesn''t have a codegen aspect?See above.> - Is Microsoft.Scripting.Host the core of the DLR? Is there a > "Official" release of that ( I noticed at one time that IronPython and > IronRuby were using different versions)Microsoft.Scripting.Core (note the core) is the new core of the DLR. This refactoring hasn''t hit SVN yet, but it will sometime today.> - What is the relationship between Microsoft''s DLR support and the > various language projects efforts (Where does MS DLR stop and other > languages start).Stuff inside of Microsoft.Scripting.* is DLR, stuff elsewhere (eg IronRuby.dll or IronPython.dll) are the languages. Thanks, -John
Thanks for the quick response!! The more I look into this, the more amazed I am by the amount of work and talent that must have gone into Microsoft.Scripting and IronRuby On Thu, Mar 20, 2008 at 11:17 AM, John Lam (DLR) <jflam at microsoft.com> wrote:> > - If I am writing a language targeted for the CLR, I use > > System.Reflection.Emit to create IL. Is there "IL" for the DLR? > > There are expression trees. You generate an expression tree and we either transform them into IL or interpret them depending on the context.When you say "we" do you mean the IronRuby code, or Microsoft.Scripting? Can you give me a starting class to look into to see how this is done? I''m still not sure whether we''re talking about creating an expression tree based on the syntax of whatever language is being interpreted, and then walking the tree to transform/interpret -- Greg Akins Software Development Manager SSI Services http://kc.vanadium.com http://www.pghcodingdojo.org http://www.insomnia-consulting.org/monologue
2008/3/21, Greg Akins <angrygreg at gmail.com>:> - If I am writing a language targeted for the CLR, I use > System.Reflection.Emit to create IL. Is there "IL" for the DLR?Yes. See classes under Microsoft.Scripting.Ast.> - Is DLR code generated? Or is part of the "hosting" that it''s > interpreted during runtime, and doesn''t have a codegen aspect?Yes. See classes under Microsoft.Scripting.Generation. It is a IL code generation backend. Actual compiler is in Microsoft.Scripting.Ast.LambdaCompiler. LambdaCompiler takes DLR AST and outputs IL using Microsoft.Scripting.Generation.> - Is Microsoft.Scripting.Host the core of the DLR? Is there a > "Official" release of that ( I noticed at one time that IronPython and > IronRuby were using different versions)Microsoft.Scripting.Hosting is a shell around DLR. It doesn''t make sense to release Microsoft.Scripting.Hosting only. Concerning the official release, there is no official DLR release as far as I know.> - What is the relationship between Microsoft''s DLR support and the > various language projects efforts (Where does MS DLR stop and other > languages start).Language projects stop at language-specific parts. DLR starts at language-common parts. -- Seo Sanghyeon
Greg Akins:> Thanks for the quick response!! The more I look into this, the more > amazed I am by the amount of work and talent that must have gone into > Microsoft.Scripting and IronRubyThanks!> > There are expression trees. You generate an expression tree and we > either transform them into IL or interpret them depending on the > context. > > When you say "we" do you mean the IronRuby code, or > Microsoft.Scripting?Microsoft.Scripting.> Can you give me a starting class to look into to see how this is done? > I''m still not sure whether we''re talking about creating an expression > tree based on the syntax of whatever language is being interpreted, > and then walking the tree to transform/interpretBest place to look for this info is Martin Maly''s blog about DLR - http://blogs.msdn.com/mmaly Check out his ToyScript examples - they are much better to learn from since a real language contains far more ... um ... crap :) Thanks, -John
>> There are expression trees. You generate an expression tree and weeither transform them into IL or interpret them depending on the context.> When you say "we" do you mean the IronRuby code, or Microsoft.Scripting?Words like "You" or "we" are confusing. Better statement would be that IronRuby generates an expression tree and Microsoft.Scripting compiles the expression tree into IL or interprets it. -- Seo Sanghyeon
http://blogs.msdn.com/ironpython/archive/2008/03/16/dlr-resources.aspx has a list of resources that would be of use to you. One link that I added recently is http://www.dotnetguru.org/us/dlrus/DLR2.htm, which would quite useful for someone starting to implement a new DLR language. Thanks, Shri Want to work on IronPython, IronRuby, F#? Visit http://blogs.msdn.com/ironpython -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of John Lam (DLR) Sent: Thursday, March 20, 2008 8:35 AM To: gakins at insomnia-consulting.org Cc: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] General Question on DLR languages Greg Akins:> Thanks for the quick response!! The more I look into this, the more > amazed I am by the amount of work and talent that must have gone into > Microsoft.Scripting and IronRubyThanks!> > There are expression trees. You generate an expression tree and we > either transform them into IL or interpret them depending on the > context. > > When you say "we" do you mean the IronRuby code, or > Microsoft.Scripting?Microsoft.Scripting.> Can you give me a starting class to look into to see how this is done? > I''m still not sure whether we''re talking about creating an expression > tree based on the syntax of whatever language is being interpreted, > and then walking the tree to transform/interpretBest place to look for this info is Martin Maly''s blog about DLR - http://blogs.msdn.com/mmaly Check out his ToyScript examples - they are much better to learn from since a real language contains far more ... um ... crap :) Thanks, -John _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
On Thu, Mar 20, 2008 at 6:36 PM, Shri Borde <Shri.Borde at microsoft.com> wrote:> http://blogs.msdn.com/ironpython/archive/2008/03/16/dlr-resources.aspx has a list of resources that would be of use to you. >I''ve been busy reading these articles, and reading code. While comparing IronRuby and IronPython, I realized that the Microsoft.Scripting is different. My assumption was that part was "the DLR" from Microsoft, so it would be the same across all DLR based languages. Are the differences just version differences? For example, Microsoft.Scripting.Ast.LambdaCompiler is in IronRuby, but not IronPython. -- Greg Akins Software Development Manager SSI Services http://kc.vanadium.com http://www.pghcodingdojo.org http://www.insomnia-consulting.org/monologue
Yes, they are just different snapshots of the same code base. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Greg Akins Sent: Tuesday, April 01, 2008 5:52 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] General Question on DLR languages On Thu, Mar 20, 2008 at 6:36 PM, Shri Borde <Shri.Borde at microsoft.com> wrote:> http://blogs.msdn.com/ironpython/archive/2008/03/16/dlr-resources.aspx has a list of resources that would be of use to you. >I''ve been busy reading these articles, and reading code. While comparing IronRuby and IronPython, I realized that the Microsoft.Scripting is different. My assumption was that part was "the DLR" from Microsoft, so it would be the same across all DLR based languages. Are the differences just version differences? For example, Microsoft.Scripting.Ast.LambdaCompiler is in IronRuby, but not IronPython. -- Greg Akins Software Development Manager SSI Services http://kc.vanadium.com http://www.pghcodingdojo.org http://www.insomnia-consulting.org/monologue _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core