Saturday, March 29, 2008

Exploring the Dynamic Silverlight SDK

Jimmy Schementi answers some questions on the Dynamic Silverlight SDK and explains what all the bits are:

Thursday, March 27, 2008

IronPython Studio and Unit Testing with IronPython

Ben Hall blogs about his (not so successful) experiments with IronPython Studio, while David Seruyange blogs about his (more successful) unit testing with IronPython:

Monday, March 24, 2008

Channel 9 Videos: Deep DLR and Resolver One

Two new channel 9 videos:

IronPython, Silverlight and the DLR

Various recent blog entries on IronPython, Silverlight and the DLR:
I've updated Planet IronPython to include blogs from the new (or newly blogging) members of the Microsoft Dynamic Languages team: Srivatsn's Blog, Dino Viehland, and Harry Pierson.

Getting Started with IronPython

Ben Hall (a .NET expert from the UK) has been experimenting with IronPython. He has written up his experience so far as a blog entry:

Friday, March 21, 2008

Build your Own Language and IronPython DSL Update

Two new articles:
  • IronPython DSL for Databses Update V - Another update to David Seruyange's IronPython DSL for working with databases. His target is to end up with a DSL that lets him write "database('excel').tables('sheet1').copyto.database('mydb')".
  • DLR - Build Your Own Language - A Bitwise article on using the Dynamic Language Runtime and the ANTLR parser to create your own language.

NWSGI and subprocess

In the last few days there have been two announcements about modules for IronPython:
  • NWSGI - a 0.1 binary release of a C# WSGI implementation. It comes with a 'Hello World' application, works with simple paste applications and almost works with CherryPy! It is very simple to deploy with IIS 7.
  • Subprocess for IronPython. The subprocess module is one of the biggest gaps in IronPython standard library support (this is the biggest reason that SCons can 't easily be got running on IronPython for example). This implementation (based on System.Diagnostics.Process) has limitations, but passes around 2/3 of the test suite for subprocess.
The good news is that one of the things that Dino was working on during the PyCon sprints, was better subprocess support for Django.

The 'soon-to-be-IronPython-commander-in-chief', Harry Pierson, has blogged a simple way to launch the Visual Studio development server for experimenting with NWSGI.

Tuesday, March 18, 2008

Articles and Code Examples

Two useful new articles/blog entries with good code examples:

DLR Resources and Silverlight on DDJ

One of the IronPython team has put together a blog entry pointing to all the resources available on the Dynamic Language Runtime:
At PyCon I did an interview with Dr Dobbs Journal on Silverlight:

Welcome Srivatsn

Srivatsn recently joined the dynamic languages team at Microsoft as a tester. It was great to meet him at PyCon, and I've just discovered his blog:

Django Plays on the Darkside and an MS SQL Provider

At PyCon 2008 Dino Viehland demonstrated Django running on IronPython (with some funky Silverlight communicating with Django via JSON as a bonus).

Sunday, March 16, 2008

Using .NET Libraries in CPython

The slides and downloads from Feihong Hsu's PyCon talk on .NET and Python.NET are up:

Creating and Consuming IronPython Assemblies

jpager looks at compiling Python code from .NET using the IronPython engine and using the resulting assemblies:

Saturday, March 15, 2008

Silverlight 2: Dynamic Silverlight

The new release of Silverlight has shiny new controls and a new way of packaging dynamic applications. You can read about the new release in my blog entry, and download the dynamic languages SDK (and access other resources) through the Dynamic Silverlight website:

Friday, March 14, 2008

A Comparison of C#, IronPython and Boo

A comparison of three .NET languages by applying them all to a single problem:

Applying IronPython to a .NET Application

A deeper example of embedding IronPython (and executing Python code) in a .NET application:

IronPython 2.0 Beta 1

IronPython 2 is finally out of alpha! The first beta has just been released.
There is a huge list of minor bugs and issues fixed in this release. The 'headline' changes for this release are:
  • PEP 328, absolute and relative imports, has been implemented
  • PEP 302, new import hooks, has been implemented
  • Numerous Python dictionary improvements
  • ‘sys’ is now a real builtin module
  • Test projects for IronPython .NET (ClrAssembly) and COM interop (DlrComLibrary) support have been added to the ‘Src\Tests’ directory within the source zip file
  • More improvements to the –X:PreferComDispatch flag
If you were missing the fantastic DLRConsole demo for the new Silverlight 2 release, then good news. Yesterday 'the team' (actually Jimmy Schementi I think - who is one of the few IronPython devs who isn't at PyCon) uploaded an updated version to the Dynamic Silverlight site: DLRConsole Demo for Silverlight 2.

More on IronPython

Haibo Luo continues his exploration of IronPython with three blog entries. These explore areas of the .NET framework and the IronPython executables:

Quick Scripting for .NET

Regdeveloper have started a series of articles on scripting .NET with IronPython. The first one introduces Python and illustrates its power by automating Office with a few lines of IronPython

Wednesday, March 12, 2008

New Dynamic Languages Program Manager

IronPython has a new boss! Harry Pierson is joining the team as program manager for dynamic languages:

Monday, March 10, 2008

Signature Resolver in IronPython

Haibo Luo explores .NET introspection using IronPython - examining method signatures (and local variables) for dynamic methods:

.NET Scripting Using Python

Jpager explores using IronPython as a scripting environment for C# by embedding the IronPython engine:

Simple Programming with Sound

Sarah has been exploring Python and music with IronPython. This blog entry shows the SpeechSynthesizer class and is a teaser for the Cleveland Day of .NET on May 17th:

Sources of the DLR

A question that often comes up when discussing the Dynamic Language Runtime is "where do I get it from?". Martin Maly answers this question:

Bazaar on IronPython

One difference between the JRuby project and IronPython is that JRuby has an obvious and large project to target for compatibility testing. If JRuby runs Rails well, then it is almost certainly a good implementation of Ruby...

There is no such ubiquitous project to demonstrate Python compatibility (which is a testament to the diversity of Python usage of course). There have been some people who have got Django working with IronPython (which could be a great use case for IronPython) but it would be nice to hear more noise on the IronPython mailing list about the difficulties encountered.

One large Python project is the Bazaar Distributed Version Control System. There has been at least some attention paid to looking at IronPython compatibility:

IronPython Cookbook: New Entries and Python.NET

Feihong Hsu (who is doing a talk on Python.NET at PyCon 2008) has added several new entries to the IronPython Cookbook. He has also updated more entries to make them compatible with Python.NET (or adding notes on ones that aren't compatible with Python.NET).

New entries:
Those of you interested in trying Python.NET with .NET 2.0 SP1 may be interested in this blog entry by Feihong Hsu (with Windows Forms example code) on a Python.NET patch (with binaries) to make it work.

Jeff Hardy has also been attempting to get SCons working with IronPython. He hasn't succeeded yet, but has written up his progress in the cookbook: SCons on IronPython.

Tuesday, March 04, 2008

Building a Dynamic Language: the Story Continues

Martin Maly has written three new blog entries on implementing dynamic languages with the Dynamic Language Runtime.

IronScheme Release and New Codeplex Project: Coils

There is a fresh release of IronScheme (an R6RS compliant Scheme implementation built on the Dynamic Language Runtime). This release is 1.0 Alpha 2. There is also IronScheme support in the XACC IDE.
There is a new project listed on Codeplex: Coils.

Coils takes IronPython classes and generates static wrappers for them so that they can be used from other .NET languages (like C# and VB.NET). Coils doesn't translate the Python code, but generates a wrapper class that calls back into the IronPython engine. There is no official release on the Codeplex site yet, but the source code is available.

PyCon Python and .NET Open Space

Feihong Hsu, who is speaking at PyCon on Python.NET, is organising a 'Python and .NET' open spaces event. This is for IronPython and Python.NET users and anyone interested in Python and .NET.
It is too early to book a definite room/time - but he is thinking about Saturday night (March 15th) from around 7:00 to 8:30pm.

See you there!

He is also keen (and I think that it is an excellent idea), that as many people as possible involved in Python and .NET do lightning talks. I will be attempting to get together a lightning talk on the Resolver Systems 'Ironclad' project.

Interesting subjects would be projects like Coils and Ironclad and languages like Boo and Cobra.

Monday, March 03, 2008

IronPython has Serious Competition: Sun Hires Ted Leung and Frank Wierzbicki

In September 2006 Sun hired two JRuby developers to improve the story of dynamic languages on the JVM. This was seen by many as both long overdue and a response to Microsoft developing IronPython (and the Dynamic Language Runtime) for .NET.

As Jython has been around for longer than JRuby, many in the Python community wondered why Sun weren't supporting Python. Finally they have answered, by hiring Ted Leung and Jython lead developer Frank Wierzbicki.

On his blog Ted says:

"there will be at least two of us working on Python related stuff. That includes Jython, Python support for Netbeans, and some other stuff that we haven’t quite figured out yet. We definitely will be looking for things that we can do to support CPython and the Python language as a whole. This is not just about Python on on the JVM. Sun will try to make its platforms, OpenSolaris and the JVM, the best place to develop and deploy Python applications."

Frank says:

Sun Microsystems has hired me to work full time on Jython. They have also hired Ted Leung to represent the wider world of Python at Sun.

So what does this mean for Jython? First off, just in case anyone is worried: Jython is going to remain completely open source. Sun has applied for memebership to the PSF and the PSF will continue to be the steward of Jython's code. This move by Sun means that Jython is going to get some of the attention that it needs to move forward.

The JRuby folks have already been working with the Jython folks to find those places where we can share code. The fact that they work for Sun was no barrier at all to cooperation, but being in the same company means that I am going to interact with them all the more. Close cooperation with JRuby has no downside for Jython whatsoever.
Great news for Jython and Python in general!

Saturday, March 01, 2008

Setting Up the Silverlight DLRConsole on Apache

The DLRConsole lets you execute Python code in the browser. Silverlight 2 may be just around the corner, but this blog entry shows you how to configure Apache to correctly serve the current version (for Silverlight 1.1):
To be fair, these instructions will probably still be valid for the 2.0 version. Let's hope the DLRConsole is updated quickly to work with Silverlight 2!

Variations on Trees

Martin Maly (one of the chief architects of the DLR) has written another blog entry on creating dynamic languages with the Dynamic Language Runtime. This entry is a comparison of DLR trees (the ASTs used by the DLR to represent dynamic language programs) with LINQ Expression Trees. LINQ Expression Trees can be generated by the C# compiler from expressions that look a bit like list comprehensions. Unfortunately there is no built-in compiler support (yet...) for generating DLR Trees directly, but they are very similar: