Tuesday, July 28, 2009

.NET Dynamic Languages Deep Dive: Bring your scuba gear!

So I’ve been playing around with IronPython for a little while now and have been having a lot of fun learning to combine dynamic and static programming techniques. I haven’t tried to do anything too fancy yet, but using an IronPython powered spreadsheet to create a Texas Holdem Monte Carlo Simulator did show that you can get reasonably good performance just hacking away at a problem, even when there are a few extra levels of indirection, binding, and code generation added into the mix.

Lately I’ve been keeping my Google Reader RSS feed full of cartoons, news, and blog posts, and I just barely got around to digesting Bruno Terkaly’s break down of C# 4.0 and the Dynamic Language Runtime. He uses his blog to do presentations, so there usually are a lot of diagrams and a few key paragraphs of text, but if you have been keeping up with the developments then the pictures really help to pull things into perspective.

This post in particular was expanding on Jim Hugunin’s talk about the use of Dynamic Languages in Microsoft .NET from PDC 2008 almost a year ago. I had seen Anders Hejlsberg’s presentation about The Future of C#, but I hadn’t had a chance to watch the video about the DLR until today. If anyone is wondering why there is so much hype about the DLR, the new Dynamic type in C#/VB.NET, or the emergence of IronPython and IronRuby, I suggest taking a look at both of these videos, as they show what in my mind is the future of programming. These technologies have been picking up steam over the last year or two, but when .NET 4.0 and VS 2010 ship in the near future, I expect to see a lot more applications taking advantage of this new powerful platform.

The DLR in particular is quite fascinating, in that it bridges the gap between Dynamic and Static languages, as well as creating a method for connecting .NET code to COM, Javascript, Python, Ruby, and whatever else you want to tie into it with a custom binder. Also, with the DLR being supported in Silverlight, there are a lot of new opportunities for running managed dynamic code directly from a browser. Gestalt for instance is a newly released project hosted at the Microsoft mix online community labs, which has the goal of letting web developers replace or supplement their JavaScript code with Ruby, Python & XAML directly embedded into HTML pages using the standard <Script> tags that get parsed by Javascript and Silverlight. Very interesting stuff!

Thursday, July 9, 2009

IronPython SpeechSynthesizer Mad Lib!

I just submitted a Mad lib Spreadsheet to the Resolver One Exchange that shows how to use the System.Speech.Synthesis.SpeechSynthesizer class to make a talking Mad Lib. In case anyone else is looking to do Speech Synthesis from IronPython, I will post the code here as well. Enjoy!

Thursday, July 2, 2009

Box Selection in Visual Studio: You learn something new every day!

I was browsing on the Coding4Fun site and came across this cool video about Box Selection in Visual Studio 2010:

<a href="http://video.msn.com/?mkt=en-US&amp;playlist=videoByUuids:uuids:3e57917d-1b92-4188-b898-25a1d64a408e&amp;showPlaylist=true&amp;from=shared" target="_new" title="Box Selection and Multi-Line Editing Demo">Video: Box Selection and Multi-Line Editing Demo</a>

Looks like deleting a box selection has been around for a little while in both Visual Studio and Office (simply hold the alt key while you select the text), I just never knew about it. Heck, only recently learned about using the clipboard ring a few months ago. VS 2010 adds the ability to also do inserts and replaces when doing a box selection, which really would come in handy while coding.

Blog.TheG2.Net - Your guide to life in the Internet age.