
With the
announcement of
Silverlight 2 Beta 2, the
Silverlight Dynamic Languages SDK has been updated as well!
Download the Dynamic Languages SDK!
What's new?
There's a lot of new stuff here, from new versions of IronRuby, IronPython, Managed JScript, and the Dynamic Languages Runtime, to more samples and better packaging.
Latest Bits
This release packages up the latest bits for the three languages, as well as the DLR and Silverlight integration. The most noticeable difference is the extra DLL that is provided: Microsoft.Scripting.Core.dll. This contains the core functionality of the DLR, while Microsoft.Scripting.dll contains non-necessary pieces like helpers and
Hosting API.
More Samples
Also, there is a whole slew of new samples! IronPython and Managed JScript have their fare-share of samples; IronRuby is lacking a bit but new ones are being added in during this week, so sit tight!
Separate packages
One difference from the last release is now there are three packages: SDK, SDK Source Code, and SDK Samples.
- SDK: Necessary package to create dynamic language Silverlight applications.
- SDK Source Code: If you want to modify the languages/DLR/Silverlight integration, you can do so here, and build using the given Solution file in Visual Studio. This will create a /bin directory with the identical binaries as the /bin directory in the SDK, however without DLL signing.
- SDK Samples: a bunch of Ruby, Python, and JScript samples. Best bet is to unzip this in the SDK directory.
Future
This release is important, as it marks the last time this package will be the main ship vehicle for dynamic languages in Silverlight. Every binary release of IronPython/IronRuby will distribute Silverlight binaries necessary to build applications with the language, and the distributed source code will build against Silverlight. They will always work with the latest released version of Silverlight.
This package will always be available as the languages that share the same version of the DLR, until the DLR stabalizes. Then, who knows ... =)
Alright, go make some awesome stuff!
12 comments:
Is it possible to embed a DLR Language inside of a C# silverlight project?
There a are certain dynamic properties from a DLR language I would like to leverage inside of a "Standard" sl project.
Definitely! That's actually how this SDK works; it's a Silverlight application that hosts the DLR! Take a look at the source code; Microsoft.Scripting.Silverlight is the Silverlight application, and DynamicApplication.cs is where the actual entry-point class is defined. That'll show you how to host the DLR inside your C# application.
Dave, A write-up of exactly how to accomplish would be awesome, do you have interest in doing it? Or at least sharing with me your experience of doing it, and what pain-points there are?
Please give me a DLR Console for Silverlight 2 Beta 2!!
Is it that the hosting API will reside in Microsoft.Scripting assembly instead of Microsoft.Scripting.Core from now on? Geez, when did that happen? Haven't seen IronPython's nor IronRuby's DLR code update for quite a while.
Ah, and there's this mispelling in ScriptHost.cs, line 32:
/// The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup
_arguments_
I've got a question, though. Besides calling LoadAssembly() on ScriptRuntime objects, what else has to be done in order to get the languages on DLR have a "System" variable on their global scopes, that points to a NamespaceTracker?
Say if I did this:
ScriptRuntime env = ScriptRuntime.Create(setup);
env.LoadAssembly("mscorlib");
env.LoadAssembly("System"); // is this all?
// env.Globals.SetVariable("my_var", myVar); // does this affect the following execution?
// have I successfully registered this my_var?
// ScriptEngine engine = _env.GetEngineByFileExtension("ts"); // yeah, ToyScript
// ScriptSource ...
I was trying to tweak something on ToyScript, but found it hard to _inject_ or say _register_ my own variables into the DLR's scope. I just can't get the global ScriptScope that's actually used by the language.
@KKI: You got it; it's in the sdk-sdk-samples.zip
@anonymous:
You misspelled "mispelling" =P
To load mscorlib and System, you have to pass their full strong-name to LoadAssembly. We have helpers on the PlatformAdaptationLayer to do that:
runtime.Host.PlatformAdaptationLayer.LoadAssembly("mscorlib")
runtime.Host.PlatformAdaptationLayer.LoadAssembly("System")
Bravo!!!!!!
I've been waiting for this day. I'm really really happy to get DLRConsole for SL2B2.
Fantastic stuff! Question about the DLR Console itself - app.py is about 2k lines of python code. Just trying to wrap my head around it as I would like to add Jim's cool console to an app I am building that uses the DLR. Is there a way in Visual Studio to debug and step through app.py?
Thanks
Hi,
Really nice. However I've BIG problem using ironpython on SL2B2 with new silverlight controls. Samples are ok for classis SL2 controls (textblock...), but using button, datagrid, etc don't works anymore, and no working sample are available on internet.
Building on example provided here :
http://www.voidspace.org.uk/ironpython/silverlight/minimal.shtml
I was unable to make SL2B2 controls (like button) works in my project)
could you provide a sample using SL2B2 controls (button for example) ?
@mitch if you have the silverlight tools installed and simply attach the debugger to your running silverlight app, then you can open app.py in VS and put breakpoints, etc.
Keep in mind the cocode is rather old and implements slot of the controls that are already avaliable in sl2. I'm working on a rewrite of it, and there's other efforts out there to make a nice dlr editor.
@antoine I hear ya, it is lacking samples to show how to use controls, or just any external assembly for that matter. I'll port one of the c# controls samples to rb/py/js.
Thanks Jimmy, it's Christmas ! :)
Post a Comment