Clearing the air about Silverlight and the DLR
It's been interesting looking at the reactions from around the blogosphere. With so many people playing telephone, I thought I'd collect a bunch of facts together in one place so that folks can get a clearer picture about what we're doing.
The DLR requires the CLR. So this means that it only works with the Silverlight 1.1 Alpha that was released at MIX, and not the Silverlight 1.0 Beta.
The source code for DLR, IronPython (and IronRuby when it is released) are being released under the Ms-PL. The Ms-PL is a BSD-style license.
The DLR will also run on top of the desktop CLR V2.0, not just the Silverlight CLR. We have a generic hosting API that lets us retarget the DLR to run on top of arbitrary hosts. Silverlight is only one such host.
The Silverlight 1.1 Alpha bits released at MIX include the DLR, IronPython and managed JScript.
Silverlight lets you run compiled .NET code in the browser, not just Python and JScript code. Any assembly that has been compiled to target the Silverlight libraries should just work. So if you want to write code in C#, VB.NET or Boo to target Silverlight, knock yourself out.
Our JScript implementation targets the ECMAScript 3.0 specification.
We will implement four languages for the DLR: IronPython, IronRuby, JScript, and Visual Basic. As of this writing we are only releasing the source code for IronPython and IronRuby under the Ms-PL. We have not decided whether we will release the source code for either JScript or Visual Basic.
Silverlight is targeted at browsers that run on the two most popular client operating systems: Windows and Mac OS X. Miguel de Icaza was quoted as saying that they will release a Mono+Linux implementation of Silverlight by the end of the year.
Silverlight V1.1 will only target Intel Mac OS X machines.
Is there anything else that I missed?
"The DLR will also run on top of the desktop CLR V2.0, not just the Silverlight CLR."
Hi John,
So does this mean that the Silverlight CLR is different than the Desktop CLR? There are two distinct CLR's?
If you write an assembly using the desktop CLR, say one containing strictly business logic and that used the namespaces that are available in the Silverlight CLR, could you re-use it in your Silverlight application after a re-compile? Would you even have to recompile?
Posted by: Scott | May 07, 2007 at 10:38 AM
Could you please send a mail to the navision team at microsoft and recommend them that they should port the C/AL language to the .net platforum using the dlr. (without c#-generator-behind-the-scenes-.net-black-magic comming in the new 5.1 version)
you have so many more languages at microsoft. whats with axapta?
Posted by: chris | May 07, 2007 at 01:52 PM
@Scott:
There are differences between desktop and CoreCLR. For example P/Invoke and COM interop code isn't present in CoreCLR because it doesn't make sense for the browser security model.
Posted by: John Lam | May 07, 2007 at 02:36 PM
Does the CLR used in Silverlight for OS X share the same codebase as the Windows version (ie: with some #ifdef's or similar included) or is mono used?
Posted by: Doekman | May 08, 2007 at 12:16 AM
CoreCLR shares the codebase with Windows. There is no Mono code in Silverlight.
Posted by: John Lam | May 08, 2007 at 02:32 AM
You said:
Silverlight V1.1 will only target Intel Mac OS X machines.
The 1.1 alpha is running just fine on my PowerBook. Still, I'm upgrading to a MacBook Pro later this week, so the point is moot, at least for me.
Can't wait to get my hands on Silverlight with IronRuby. Are you attending RailsConf next week by any chance? I am. Email me if you're attending and we can chat IronRuby. I'll buy you some beers.
BTW, just thought I'd mention, I've been a Rails developer for over a year, using Mac OS X & Textmate. Silverlight might just make me a Windows and MS Visual Studio customer again.
But if and only if, Ruby and Python are fully supported in the next release or through fully supported VS add-ins.
If Ruby and Python are never fully supported by Visual Studio, whether as native features or through officially supported add-ins, I'll just use Textmate to create my XAML and Ruby script for Silverlight client-side, and Textmate for the Rails back-end.
I'm not switching to that POS of an app server, IIS, or the other POS, ASP.Net, that's for sure.
Posted by: PJ Cabrera | May 08, 2007 at 09:15 AM
Hi John
definitely looking forward to a first IronRuby release (even beta-ish).
I have one specific question: are there any plans to support interaction with existing libraries or gems, or will IronRuby support only pure ruby + dotnet libraries ?
best regards and hope you enjoy the new job (you seem to!)
Thibaut
Posted by: Thibaut Barrère | May 09, 2007 at 12:46 PM
Just wonder ...
Recently Microsoft announced that it drops future development of Visual FoxPro package. Taking into acount that VFP is a "dynamic" language from the "begining", I wonder why VFP development was dropped.
Was it only a "marketing move" or were there any technical reasons (with DLR support) behind it ?
So I would like to ask if DLR is capable enough to build something like VFP on top of it ...
Posted by: gotenks | May 10, 2007 at 07:56 AM
@Thibaut:
We are going to port a set of 'core' C-based Ruby libraries to C#. As for what 'core' is, we're still figuring that out. This is similar to what we've already done using IronPython.
@gotenks:
I'm pretty sure we've never had any discussions with the VFP team. And Microsoft is a *big* company, so I have no idea what those guys are up to - wherever they are! :)
Since I know nothing at all about VFP, I can't comment on the feasibility of implementing it on top of the DLR. That said, perhaps the real value of VFP is from its runtime environment + design-time environment vs. just the language?
Posted by: John Lam | May 10, 2007 at 08:54 AM
Congratulations on a great presentation!
I saw this Python code in the source code for DLRConsole.
SetIntValue = DependencyObject.SetValue.Template[int]
What would be the JavaScript equivalent?
Cheers,
Eddy
Posted by: Eddy Young | May 10, 2007 at 12:39 PM
There is currently no support for generics in the Alpha release of JS for 1.1. But it's on the roadmap ...
Posted by: John Lam | May 10, 2007 at 05:27 PM
Thanks for the reply, John. I guess I'll stick with IronPython for now :-)
Where is the documentation for generics in IronPython? I haven't found any :-(
Eddy
Posted by: Eddy Young | May 11, 2007 at 02:08 AM
Is it possible to run the Silverlight CLR without a browser?
We have a big problem with the desktop CLRs because only one version can run in one process. I understand the Silverlight CLR does not have this restriction. However, we would also need COM Interop support.
Is there any solution for this problem?
Regards,
Michael
Posted by: Michael Gunzert | July 18, 2007 at 07:03 AM
@Michael:
We're thinking about this, but we don't have any definite plans for running Silverlight CLR outside of the browser at this time.
Posted by: John Lam | July 18, 2007 at 07:38 AM
I am invested in Silverlight. Please consider making it run on the PPC Mac (17mil 2001-2005) and making it run H.264.
Does IronPython run Django smoothly?
Posted by: david jensen | August 25, 2007 at 08:33 AM
John, how to know which classes are available in the desktop CLR versus Silverlight, or rather which classes are not available in Silverlight ? Any reference you could point me to ? Cheers
Posted by: Fabrice | October 25, 2007 at 03:49 AM