The title of my presentation was "How I Learned to Love Metaprogramming" and it concerns Dynamic Language Runtime architecture, performance of dynamic typing and Python to C# integration. The slides and source code are linked below. I will be giving this talk again in September at the Charlottesville .NET User Group meeting. Both of the demos require C# 4.0 which is available in Visual Studio 2010.
- Demo One - shows how to do XML parsing using a fluent interface based on a DynamicObject derivation in C# 4.0
- Demo Two - shows how the Level 0, 1 and 2 CallSite and ActionBinder caches perform. UPDATED: I added a demo on 30 June 2009 that shows how the DLR 0.9 compares by invoking dynamic code through the DLR hosting APIs, thereby bypassing the CallSite caching mechanisms. The results are very instructive, showing that the DLR's polymorphic inline caching can yield a 250000% increase in performance. You read that correctly: a two hundrend fifty thousand percent increase in performance.
Recordings of talks from EuroPython 2009 are now available (in the hippy friendly ogg format). Several of the talks were on IronPython and Python on .NET. These include:IronPython in Eclipse through the Pydev extensions was recently announced. Pydev 1.4.7 is the first released version of Pydev with IronPython integration:
Several of the talks also have slides available from the recorded talks page. There are various other interesting talks, including one on a Visual Studio Vim plugin and several on alternative implementations of Python including Jython, PyPy and HotPy.
- Introduction to IronPython (Michael Foord)
- Python, .NET and the weather (Patrick Buchier)
- Ironclad: Hubris and Laziness (William Reade)
- Jumping worlds with Python - Implementing Libraries for Java and DotNET with Python (Thomas Bleier and Bojan Bozic)
The major features (Iron Python integration and the new way of running as unit-test / running the current editor with the configured nature) were previously discussed in a previous post and are now available in this release.
Note that the Iron Python debugger is still not available in this release, but it seems that the next release of Iron Python will have the sys.settrace() support, so, there's a chance that the next Pydev version has a debugger for it.
I thought I would share another Iron Python snippet I hacked together a few weeks ago. The PrintTables method accepts a OleDbConnection to the spreadsheet and returns a list of Excel Table (Sheet) names.support for IronPython. They have a new example for Data Driven Testing. The sample is in C#, VB.NET and IronPython.
In this tutorial you will create a simple recording and perform the same operations with multiple sets of data. You will use a data table (Excel CSV) with a set of parameters so that you can run your recording several times using a different set of data.