Scott Hanselman

Putting Mix, Silverlight, the CoreCLR and the DLR into context

May 1, '07 Comments [28] Posted in ASP.NET | Javascript | Mix | Programming | Ruby | Silverlight | XML
Sponsored By

Updated: I got some feedback from some MSFTies and this is an updated ecosystem diagram. For reference, here's the original ecosystem diagram. This version is better, but still who knows, eh?

I'm over here at Mix. There were some big announcements at Mix07 this year. Many were expected, a few were not. I've been following WPF/E with interest for the better part of a year.

Overheard: "There's a lot of college kids, lotta high school kids out there who expect more things to move." - CEO of referring to the increased expectations young folks have while on the web.

I'm off in a corner here at some party trying to put it all into context. For a complete list of links, I'll suggest you head over to Sam Gentile's site.

Most Awesome Marketing-Guy Quote of the Day: "This announcement opens up significant opportunities in both the 'lean-in' and 'lean-back' environments." - MLB Marketing Guy refererring to folks watching at their desks, or on their couches.

 Here's what was announced in the driest terms:

  • Silverlight 1.0 Beta - Lightweight Browser plugin that can render XAML, play HD 720p Video with included VC-1 codecs and be accessed via JavaScript. Supports Windows and Mac OS X.
  • Silverlight 1.1 Alpha - All of the above including a CLR 2.0 (Whidbey) compiled CLR and Type System along with select BCL (Base Class Library) classes from the .NET Framework 3.5 (Orcas) including DLINQ. Also included is a new dynamic language runtime (DLR) layer and support coming for Python, Ruby, VBScript VBx (Visual Basic "10") and JavaScript (ECMAScript). Compiled/JIT'ed JavaScript is at least 1000x faster than interpreted. Supports Windows and Mac OS X.
  • Expression Studio - Design, asset management and interaction design application suite with XAML editing and Visual Studio integration, along with a Media Encoder.
  • Silverlight Streaming - More developer focused than YouTube, this service gives you 4GB of free storage and virtually unlimited streaming of video clips using Microsoft's content deployment network. Why? Because Silverlight looks bad if your web host sucks, and if Microsoft hosts your videos, you, Microsoft, and Silverlight all look good.

Some good places to start learning are:

Now, what follows is just me talking. Not my company, just me and everything here is just my opinion and ruminations. 

Everyone who saw the keynote has a different take on what they've seen, and what Silverlight means to them. While the Microsoft messaging was pretty spot-on, I think that some context couldn't hurt.

Silverlight has Flash-like qualities, and Adobe was brilliant to counter the coming announcement with the Open Sourcing of Flex. All this means more choices for me, the developer.

Overheard: "This is the biggest thing since God talked to Moses. Well, maybe not, but it's still up there."

While folks are justifiably stoked about the rich media and interaction benefits of Silverlight, and I don't mean to draw attention away from those good things, but I want to touch on the most game-changing aspects of this announcement while you all are watching 720p HD video over Silverlight and thinking this is a direct shot over the Flash bow.

1. The impact of the new Dynamic Language Runtime should not be underestimated.

This new layer on the CLR adds a number of features around code generation and dynamic type systems that take the CLR's already decent support for dynamic languages to a considerably greater level. This DLR will enable support for Python, EcmaScript 3.0, Visual Basic "10" (VBx - VB as Dynamic Language), and Ruby. Initially this support will be enabled in Silverlight in the browser sandbox, but will no doubt move to the server side soon.

A cool side note; John's team added a subtle nod to the Ruby team in their demo. If you want to access a .NET library, like say, List.AddRange(), when you access it from Ruby it'll be list.add_range. Subtle, but an important (and classy) statement of respect for one of the things that Ruby programmers feel strongly about.

1a. Code for the DLR, IronPython and IronRuby will be released under the Microsoft Permissive License.

This is nothing but a good thing. I look forward to seeing what the folks who use Boo (another alternate .NET language) and the MonoRail and Castle Project guys come up with in to exploit these new dynamic services for their languages and environments.

2. There's a "new" CLR in town, and it's for more than just animation.

During the demo, ScottGu showed a Windows Developer connecting to a "CoreCLR Remote Debugging Service." The text "CoreCLR" appeared briefly in the Attach to Process Window in Visual Studio.

Check out this great diagram of the Silverlight 1.1 world, at right - click for the giant version.

The CoreCLR term refers to the CLR that powers the Silverlight 1.1 Alpha. I like to think of this as a "reimagining" or refactoring of the current CLR. The Silverlight CLR isn't tiny, micro, or crippled. It's refactored, modularized, tightened, simpler with fewer dependencies. This new CLR design will likely power and influence future CLR versions. The diagram above is my own speculation, memory and from Googling around.

Also, the CoreCLR in Silverlight can live in the same process space as the existing CLR. So if Internet Explorer has a .NET plugin or toolbar loaded, Silverlight keeps working fine.

2a. You can use and re-use existing .NET assemblies, business logic even, in Silverlight

The assembly format is the same - it's the same CLR - so things that you've previously used on the server-side and potentially (depending on the libraries in the BCL you used) reuse them on the browser-side and finally put all these Core2Duos to work doing more than just waiting for <angle brackets to show up> for rendering.

2b. It works on a Mac. Same binaries, no cross compilation, just IL, working cross-platform.

The Mac version of Silverlight is a Universal Binary and runs the same code and renders the XAML exactly the same on the Mac as it does on Windows. There's also, as mentioned before, support for debugging Silverlight client apps running on a Mac directly from within Visual Studio.

Overheard: "It's the new smart client. It's a chubby client. Everyone knows chubby girls are smarter."

One great prt of the demo was done entirely in TextMate on a Mac where ScottGu created a Silverlight XAML file and CodeBehind in IronRuby. There was no Visual Studio or C# to be seen. The potential for Silverlight to energize the LAMP stack and complete with mXml is great. Silverlight might be the only Microsoft technology in a solution. Everything can be served by any Web Server as long as the mime-types line up.

3. Your XAML can be used all over.

One thing to know about the XAML rendering that's happening on Silverlight is that it's a different XAML parser/renderer than the one included in WPF.

If you're on Vista, try this cool test. Open up the Accessibility Magnifier and hover over any WPF app, like the New York Times Reader. Rather than little raster/bitmaps becoming large raster/bitmaps, you'll see beautiful scaled vectors. As long as what you're looking at is a XAML vector rendered on Vista with WPF, you can scale it forever.

I speculate - I haven't tried this yet - that if you put the Vista magnifier over a Silverlight XAML-created vector I suspect you'll get a scaled bitmap, not a smooth vector. This is because Silverlight will run on a bare-naked Windows XP (not even SP2) machine, and Silverlight's XAML renderer is painting via GDI. This is not a huge bummer, but it's a significant and very clear, visceral way to illustrate that there are two XAML renderers. Fortunately XAML is a clear spec, and both WPF and Silverlight (on both platforms)should both render identical XAML identically. It's not open to interpretation the way that HTML was/is.

4. It's a JavaScript/CLR Type bridge

Silverlight can act, it seems, as a bridge between the world over in-browser Javascript and in-Silverlight CLR-code. Your CLR code can get ahold of the DOM and manipulate it just as your in-browser Javascript can reach into Silverlight and access properties and dispatch events.

Overheard: "This is the most significant launch since .NET 1.0 and I don't think 10% of the audience gets that."

I'm pretty stoked about this whole thing, and I'm going to dive into both Silverlight and Flex, along with other options like OpenLaszlo as there's many ways to create a Rich Internet Application these days. The addition of an integrated client-side CLR will allow for greater scalability in large systems where the server is called upon to do calculations that really belong on the (increasingly powerful) client-side.

<disclaimer>I don't work for Microsoft, nor is any of the data on that diagram from NDA'ed sources. It's very likely wrong, so enjoy.</disclaimer>

I may also have overheard myself saying all those quotes, but one can't be sure about these things. :)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Continuous Integration Screencast - Jay Flowers and I on DNRTV

April 29, '07 Comments [7] Posted in Nant | NUnit | Podcast | Programming | Screencasts
Sponsored By

Last week during lunch Jay Flowers and I recorded an episode of "DotNetRocks TV." We are Episode 64 of DNRTV. 

"In this episode of dnrTV, Carl has two guests (Jay Flowers and Scott Hanselman). Essentially Jay Flowers is an expert in Continuous Integration (CI), and the author of CI Factory, a helper application for setting up CI systems. Scott complements Jay as a user of CI Factory, and one who has had to set up CI without it! In this show Jay shows Scott and Carl how to set up a complete CI system with Subversion as the source control system. Jay uses SubText, a popular blog software package, as a demo source project that gets run through the CI system."

Play Flash Version in the Browser
Download zipped video
Download Torrent to Zip
Subscribe with PwopCatcher (read more below)

You remember Jay Flowers, maker of the free CI Factory, a Continuous Integration accelerator, from Hanselminutes show #54. We also talked about CI in February of 2006 on Show #4. Jay and I had said on the show that we really needed to do a visual show to help folks understand Continuous Integration and CI Factory, and this is it.

In this show, we (actually Jay) takes SubText, the popular ASP.NET/SQL Blogging Engine led by Phil Haack, and sets it up for Continuous Integration from a totally fresh machine. He walks us through the process step by step. Even though SubText already has a CI Build setup, we chose it as an example since most folks who want to do Continuous Integration likely have an existing project in mind. We wanted to show how even a fairly complex project like SubText that includes Unit Tests and many projects can be setup for CI in less than an hour. Setting up a build server (without asking your boss) can be a good way to sneak Continuous Integration processes into your company.

Jay worked very hard on preparation for this episode, on his own time, and I want to personally thank him for his work. I hope you enjoy the show.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Hanselminutes Podcast 61 - Inside the Mind of Chris Sells and The Last 15 Years of Programming - Part 1 of 2

April 29, '07 Comments [9] Posted in Podcast | Programming
Sponsored By

My sixty-first podcast is up. In this shocking episode, I visit the home of Chris Sells and we make up a topic for the show! I suggested we talk about what programming will look like in 15 years, and Chris countered with the suggestion that we chat about the LAST 15 years first, then the next 15. We have a blast when we chat, so this show went long, almost 50 minutes, so we cut it in half so as not to waste the listeners time. Chris had a bit of an allergy to me and coughed a few times and we weren't able to fix the sound, so forgive me (and Chris) ahead of time.

Part Two will be posted tomorrow so you don't have to wait a week.

Next week I'll be at Mix, and I'll have an interview with ScottGu about Silverlight as well as some other surprises.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Links from the Show

 Chris Sells Blog

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Silverlight is Argentum in a Flash

April 27, '07 Comments [5] Posted in ASP.NET | Musings
Sponsored By

Doh! Silverlight! After the Silverlight podcast I kept asking myself, why are all the DLLs and Javascripts called things like aghost and agcore? Because Ag is the symbol for Silver. Silver in Latin is argentum. Thanks Alexey!

Download Silverlight for Windows here and Silverlight for Mac here. It's only a meg and is harmless.

Be sure to check out Alexy's blog post (via Mike Harsh where I stole the Silverlight Logo) with his WPF/e (Silverlight) 3D demo based on his Bubblemark 2D Benchmark that includes:

I got over under each demo. Things slowed down with 128 balls, but I greatly suspect that it's a JavaScript problem at that point, and not an animation engine problem.

ASIDE: On an unrelated note, if you ever wanted to get Windows Media working in FireFox, download the WMP Plugin for FireFox and you'll be on your merry way.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Removing Security from Downloaded PowerShell Scripts with Alternative Data Streams

April 25, '07 Comments [7] Posted in PowerShell
Sponsored By

I was trying to run a PowerShell script that I downloaded from the Internet today and got this security warning:

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your
computer. Do you want to run foo.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):

I've written about Signing PowerShell Scripts before, but not about totally unsigned, totally un-trusted scripts. When a script is downloaded via Internet Explorer from the Internet or an Intranet, an NTFS Alternative Data Stream is added to the file with a Zone Identifier, indicating the file's origin.

You can use the free streams.exe from SysInternals to see the Alternate Data Stream for each file/script.

C:\>streams foo.ps1 

Streams v1.5 - Enumerate alternate NTFS data streams
Copyright (C) 1999-2003 Mark Russinovich
Sysinternals -

:Zone.Identifier:$DATA 26

You can see clearly that there's a Zone.Identifier stream attached alongside this foo.ps1 script.

It can be easily opened in notepad like this:

notepad foo.ps1:Zone.Identifier

And see the hidden ini file with a Zone Identifier. There's six possible values

public enum SecurityZone
NoZone = -1,
MyComputer = 0,
Intranet = 1,
Trusted = 2,
Internet = 3,
Untrusted = 4,

Notepad is kind of a coarse, but effective, way to access these streams. The PowerShell Guy has created an extension method for System.IO.FileInfo called GetStreams that lets you get at these streams from PowerShell.

In Vista, you can use the new /R switch to DIR as in DIR /R.

Personally, I like to just use the built-in (have you see this?) support in Explorer's General Property Pages for the file. You can just select Properties and under Security click "Unblock." Clicking Unblock completely removes  the Zone.Identifier Alternative Data Stream and makes scripts (and other things) executable again.

To summarize, there's lots of ways to manipulate Alternative Data Streams:

SECURITY NOTE: Firefox doesn't appear to know about zones at all, so PowerShell scripts that are downloaded from the Internet with Firefox are not marked with this Alternative Data Stream, and are therefore immediately executable, so take care. Firefox on Windows could fix this by calling IAttachmentExecute (MSDN).

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.