Posts

Showing posts from August, 2007

Mono 1.2.5 Released

Mono 1.2.5 has just been released. You can read the changelog here. " Th is release fixes various issues that were exposed by IronPython 2.0 preview release and the Dynamic Language Runtime from Microsoft. They are both functional on this release." Presumably this means that IronPython 2 (which is still in alpha) will now run on an unpactched Mono! I also assume that the included version of IronPython is now 1.1 final rather than 1.1 alpha. Other relevant changes: Devirtualization optimization for sealed classes and methods, improving IronPython 2.0 pystone performance by 4%. Other programs can expect similar improvement [Rodrigo]. Invocation speed of non-multicast delegate methods has been increased by calling directly into the delegate, this improves IronPython 2.0 (pystone) performance by 25% [Zoltan Varga]. Math.Min and Math.Max are now inlined for signed integers and String.OrdinalCompare has been tuned to use these, which results in a 2-3% perf

More Silverlight

A few more entries exploring Silverlight and IronPython: Embedding IronPython in Silverlight Assembly - IronPython can just as easily be embedded in a C# Silverlight application as a traditional .NET application. Accessing Embedded Resources from IronPython Playing Video with Silverlight - Using the MediaElement Video Player from IronPython If you serve Silverlight applications with IIS then this configuration guide may be helpful.

Manifold 8 - with IronPython Scripting

Manifold 8.00 has just been released. Included in the release highlights are 'IronPython Scripting'! Manifold is a Geographic Information System package. Python has steadily been gaining ground as the standard scripting language for GIS applications. Via Spatially Adjusted .

My First Look at DLR

Risman Adnan Mattotorang posts his exploration of the Dynamic Language Runtime: My First Look at the DLR In his previous entry he links to Nua , a fledgling project to implement Lua for .NET using the DLR.

Silverlight and IronPython

I've been doing some experimenting with Silverlight and IronPython. You will need Silverlight 1.1 Alpha Refresh to use these: WebIDE 0.2.0 - This is the addition of a 'load' and 'save' (from the local filesystem) to my IronPython Web IDE. This allows you to edit and execute blocks of IronPython code in the browser. It is a great way to explore the Silverlight CoreCLR API. You can also download the source code , which makes a useful example of a minimal IronPython / Silverlight project. System.Windows.Downloader - accessing server resources from Silverlight using System.Windows.Downloader . System.Windows.Browser.Net.BrowserHttpWebRequest - But this is better. IsolatedStorageFile - 1MB of 'in the browser' storage per application... OpenFileDialog - How to present an open file dialog to the user, and load the file they select (or not). Saving Files from the Browser - A hack (using Javascript and a Python CGI) to present a save file dialog to the user. I

IronLisp Benchmark Updated

The author of IronLisp has rerun his benchmark, running them as a program with IronPython rather than in the interactive interpreter. This means that the code is compiled by the DLR first. This time IronLisp comes out twice as fast as IronPython, but IronPython is twice as fast as CPython: Benchmarks Updated

Handling POST with HttpListener and ProgressBar

There are two new recipes on the IronPython cookbook: How to Handle POST with HttpListener - this comes from Konrad and is how to handle POST requests when writing servers that use HttpListener. Windows Forms Progress Bar - A simple example of a progress bar using Windows Forms. The progress bar is updated from a calculation performed on a separate thread.

A New DLR Based .NET Language: IronLisp

There is a new member of the 'dynamic languages on .NET' family: IronLisp The announcment is here: IronLisp Goes Live It is built on top the Dynamic Language Runtime, which is at the heart of IronPython. You can see a syntax example, including some benchmarks comparing against Python / IronPython / C# at: Benchmarks . If you're interested in .NET languages, you may be interested in the Duck Typing Project . This is a library that implements duck typing for .NET, and is written in C#. The interesting thing is that it implements compile time duck typing rather than runtime. From the website: Duck typing is a principle of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class. The library handles a lot of casting between types that you would other wise have to do yourself, for example: Casting a given object to a given interface that it does not implement by definitio

Python.NET is Alive & Well

Python.NET is a project that hasn't had much publicity since IronPython became popular. Python.NET is a build of CPython with support for .NET, meaning that you can use .NET assemblies with ordinary Python (overcoming some of the limitations of IronPython - like the non-availability of C extensions). There was recently an announcement (dated July 29th) about progress: Good evening Python for .NET users! I've a list of great news for you. In the past weeks I've spent some time in fixing and enhancing PythonNet. Summary: PythonNet now works with Python 2.4 and 2.5. Python 2.6 compatibility is already prepared. A bunch of small bugs were fixed and some new features implemented. Generics, overloading and variable parameter function should work better. PythonNet also works under Un*x and Mono with UCS 2 and UCS 4 builds of Python. Two unit tests are currently failing. The source repository contains project files for MS Visual Studio and MonoDevelop. The clr module provides new

JVM Language Runtime (inspired by the DLR)

The DLR is at the heart of IronPython 2, and is a dynamic type system and language hosting system for .NET - abstracted out of IronPython 1. It makes creating dynamic languages for the CLR (the .NET VM) much easier and makes it possible for those languages to interact with each other (sharing a common type system). Inspired by this, Charles Nutter (core developer of JRuby - Ruby for the Java VM) has started a similar project for the JVM: JVM Language Runtime Project This includes code and cooperation from the teams behind JRuby, Jython and Groovy - all prominent dynamic languages for 'Java-as-platform'. Both JRuby and Jython are working heavily on their current implementations, but in the future both languages intend to use the 'JLR' to simplify and share their work.

Visio and IronPython

Two blog entries from Saveen Reddy, illustrating using IronPython with Microsoft Visio : A preview of embedding IronPython into Visio 2007 Automating Visio with IronPython for creating Continuous Gradients

C# 3.0 as Python with Braces

A blog entry, by Saveen Reddy, comparing IronPython and C# 3.0 code side by side, using Notify Icon from the IronPython Cookbook as the example: C# 3.0 as Python with Braces Of course Python with braces isn't Python, but it could be worse...

New and Updated Recipes in the Cookbook

There have been several new entries in the IronPython cookbook recently: The IronPython 2 Parser - An example of using the IronPython 2 Parser API to extract the variable names used in a Python expression. Screen Capture - Taking a screenshot from IronPython with Windows Forms. Using Python Functions from C# - An example of embedding IronPython 2 in C# that creates IronPython functions and calls them from C#. A while ago Andrzej Krzywda posted an example of downloading web pages with IronPython. It turns out that the examples can be made even shorter. See Accessing the Web with IronPython for details. The IronPython Cookbook Downloading a Web Page recipe has been appropriately updated.

Silverlight Experimental 'Mini-Web-IDE'

I've posted an example IronPython Silverlight project - a mini web IDE that lets you enter and execute blocks of Python code in the browser. Read the description (or download the project) here: About the Silverlight IronPython Web IDE You can actually try it out here: Silverlight IronPython Web IDE This is useful as an example of an IronPython Silverlight project, but is also a useful tool for exploring the Silverlight assemblies.

How Badly will IronMonkey Hurt Performance?

'Someone' (couldn't find a name - sorry) posts a blog entry arguing that the implementation strategy for IronPython on Tamarin (IronMonkey) must be slow: How Badly Will IronMonkey Hurt Performance? Unsurprisingly, I'm not convinced: My Response In a further non-surprise, the original poster is not convinced by my response: Perspective on Python Performance

Windows Forms Transparent Label

Davy Mitchell posts an improved version of his transparent label for Windows Forms: IronPython - Transparent Label 2

Walkthrough of ASP.NET DataBinding with IronPython

A walkthrough of data binding in ASP.NET with IronPython: DataBinding in ASP.NET with IronPython

ASP.NET with IronPython, Silverlight DLR Console Prototype

Ronan Geraghty has posted an example of using IronPython with Silverlight to create an ASP.NET site: ASP.NET with IronPython, Silverlight DLR Console Prototype

IronPython in Visual Studio 2008 SDK

From the blog of Eric Lam, comes a post on the Visual Studio 2008 (what was codename Orcas), including these snippets: 2.1. Windows Presentation Framework (WPF) Designer Extensibility The IronPython sample is enriched with Windows Presentation Framework (WPF) designer extensibility. This sample provides guidance for customers who want to extend Visual Studio to integrate their .NET based languages with XAML and WPF Designer, which are introduced in Visual Studio 2008. This sample is intended to showcase these extensibility points. The sample shows how to write a basic WPF application for a managed proprietary language by using IronPython as an example. The sample also illustrates how to handle events by using EventBindingProvider. 2.3. Expression Evaluator Language integrators require an expression evaluator (EE) to work in the context of their programming language. We have created a new sample that shows how to write a basic EE for a managed proprietary language by

FbConsole 0.7.2 Release

There has been a fresh release of FbConsole, the "Firebird RDBMS Tool Powered by IronPython" (including a funky screenshot). FbConsole 0.7.2

IronPython and CPython Sets

Flávio Codeço Coelho posts a performance comparison of IronPython and CPython sets. CPython comes out a long way ahead, so more tuning needed for the IronPython set implementation: Set Implementation Performance

Using Python Classes from .NET

IronPython classes aren't true .NET classes, not least because you can swap out their base classes dynamically, add methods and have all sorts of dynamic fun with them if you really want to. There are ways to use IronPython classes from C# (and other .NET languages) though. This cookbook recipe shows one approach, which involves inheriting from a C# class: Using Python Classes from .NET

Havana CMS

Lazy Coder reports his impressions working on Havana CMS in the past 2 months. Havana CMS is developed in C# 3.0 and IronPython. Havana: Hybrid Programming

A Web Based IDE for Distributed Programming (Part 2)

Mitch Barnett shows how far he has got with his web based distributed IDE for IronPython, and explains his plans for the future (including a release schedule as Open Source): A Web Based IDE for Distributed Programming (Part 2)

DebuggerTypeProxy for IronPython Old Style Classes

Haibo Luo shows how to use the DebuggerTypeProxyAttribute to make debugging IronPython easier in Visual Studio: DebuggerTypeProxy for IronPython Old Style Class and Instance

IronPython, Visual Studio & WPF Designer

Aaron Marten explains how to get the IronPython integration sample working with Visual Studio with WPF Designer: IronPython Integration Sample and the WPF Designer