Posts

Showing posts with the label languages

A Good Mix 35: Visual Studio, WPF, a cross-platform Resolver One and IronJS (A DLR based Javascript)

Image
Another collection of IronPython and DLR related articles from recent weeks. Visual Studio 2010 Extension: IronPython IronRuby Console This extension adds IronPython and IronRuby to PowerConsole  so that you can interact with Visual Studio in IronPython/IronRuby. Please be aware that this extension only provides a simple tool to explore and interact with VS itself. It does not aim to be a development experience for the included languages. Tinesware: EasyWPF 0.3.93 An IronPython GUI library compatible with the Python GUI library EasyGUI . As the name implies, it is built on the WPF GUI library (making it Windows only). Like EasyGUI it has a demo app when you run the file showing the different controls/widgets the library supports. For more examples of how to use it visit the EasyGUI tutorial . Preview of the New Grid in Resolver One Resolver One  is a programmable spreadsheet written in IronPython. As well as being extremely powerful Resolver One is the largest ...

Does Microsoft take Dynamic Languages Seriously?

My belief is that the answer to the question in the title of this entry is an emphatic yes. Microsoft have poured a lot of money into IronPython, IronRuby and the Dynamic Language Runtime and have demonstrated a consistent commitment since the inception of IronPython. What they haven't done is build full support into their premier development tool, Visual Studio. The reason for this is that it is a very difficult problem. Visual Studio is built around statically typed languages. Features like intellisense, refactoring and code navigation all rely on having type information which is absent in languages like Python and Ruby. (The way they are implemented in Visual Studio requires that information I mean.) What Microsoft have done is provide example integration in the form of IronPython Studio, which frankly sucks . Many important features are fragile, broken or missing altogether. Good IDEs like PyDev and Wing do provide these features, so it is definitely possible - it just requi...

A Good Mix 33: Embedding Python and Ruby, Profiling IronPython, News on JScript, ctypes and DeviantArt

More IronPython and DLR related projects, articles and news from around the web. Embedded IronRuby and IronPython in Silverlight with Multiple Source Files A  nice example of embedding both IronPython and IronRuby in a single C# project. As an added bonus the project is a Silverlight project so you can add both Python and Ruby scripting to applications that run in the browser. slimtune: A free profiling and performance tuning tool for .NET applications IronPython 2.6 has useful new hooks for profiling and debugging IronPython code. Unfortunately most 'standard' .NET tools don't know how to use these, and if you attempt to profile IronPython code (particularly in an embedded environment) you have to work hard to get useful information about performance of your Python code. It's nice to see a new (and open source) tool that is designed to work with IronPython: SlimTune is a free profiler and performance analysis/tuning tool for .NET based applications, including C#...

Executing IronPython Code from IronRuby

The Dynamic Language Runtime is a framework for writing dynamic languages that run on the .NET framework, with the two "Microsoft sponsored" languages being IronPython and IronRuby. There is also IronScheme , a community project hosted on Codeplex. The promise of the DLR is not just that it makes implementing dynamic languages possible , but also that through the DLR .NET languages can interoperate. This includes IronPython and IronRuby (etc) interacting with C#, F# and VB.NET (the supported and statically typed Microsoft .NET languages) but also the reverse (statically typed languages interoperating with dynamically typed languages) and dynamically typed languages interoperating amongst themselves. All very incestuous. As far as I know this is still unique amongst the modern polyglot runtimes (.NET and Mono, the JVM, LLVM, Parrot and so on). Whilst IronRuby in particular has been changing very rapidly (IronRuby has only recently reached 1.0 RC 1) it has been hard to g...

A Good Mix 31: Texas Holdem, IronScheme, Indigo Cheminformatics, IronRuby and bridge xml

More IronPython and DLR related projects, articles and news from around the web. Texas Holdem Hand Equity Calculation in IronPython  Greg Bray has been experimenting with using Resolver One to write Texas Holdem calculating spreadsheets with IronPython. In this blog entry he shows the IronPython code for calculating hand equity: This year I have been working in my free time to create easy to use Texas Holdem poker spreadsheets based on IronPython using Resolver One. These spreadsheets can be used to calculate Win/Tie/Loss odds, but some people like to use hand equity instead since it represents a player’s overall stake in the pot. Equity of 1.0 or 100% means that they will win the entire pot, where as equity of 0.5 (50%) or 0.25 (25%) means that they will split the pot with other players. You can again use Monte Carlo analysis to run a number of trials before all of the board cards are dealt to estimate a player’s current equity in the hand. This means that if during 4 trials ...

A Good Mix 26: Winforms in Arabic, xbuild, Mono on Mandriva, Scheme and Poker

Still working through the large collection of IronPython and DLR related articles that I've discovered in the last few weeks. Only a few more to go. Windows Forms with Mono and IronPython - in Arabic  This is a translation of the Winforms with Mono and IronPython Tutorial Series  into Arabic. It includes implementations of Snake and Tetris games as the final two parts of the tutorial showing how to create applications with IronPython on Mono or .NET.   xbuild and Mono 2.6p1 A blog entry on new features in Mono 2.6 which has just had a preview release . Included in the release is xbuild , the Mono implementation of the MSBuild tool. xbuild is now compatible enough that it is capable of building IronPython and IronRuby. Mandriva 2009.1 on mono and IronPython This is a Japanese blog entry on using IronPython 2.0 with the Mandriva Linux distro. From the same blogger who has also blogged about IronEditor ,  IronScheme - An R6RS conforming Scheme implementation ...

A Good Mix 25: The SharePoint Object Model, IronPython Tutorial, Crazy Snake and IronRuby

Yet another collection of IronPython and DLR related articles, projects and blog entries from the past few weeks. Using the SharePoint Object Model with IronPython  The iLove SharePoint blog recently posted an example of using the SharePoint object model from IronRuby . In the interests of balance he has posted the same example with IronPython. IronPython Tutorial: Basics IronPython Tutorial: Advanced (Events, Delegates, WinForms, WPF) IronPython Tutorial: Debugging (CLR Debugger)  The AvbWiki, a Russian developer wiki, has put online several IronPython tutorial pages. It looks like it is mainly based on the tutorial that comes with IronPython 2, but could be a useful online reference on IronPython. Intellisense for IronPython  Another release from the mysterious Japanese IronPython and Windows Forms project that we've covered before . crazysnake; ironpython and java, just monkeying around  This weekend I finally got around to downloading IronPython 2.6rc1 ...

A Good Mix 23: IronPython 2.0.3, Eclipse 3.5, a WPF Hyperlink, dynamic in C#, MathNet and more...

Another collection of blog entries and articles related to IronPython and the Dynamic Language Runtime. IronPython 2.0.3 Must Fix Bugs With IronPython 2.6 Release Candidate 1 out of the door you might think that IronPython 2.0 was already defunct. Not true! David DiCato, an IronPython core developer, just posted to the IronPython mailing list asking what bugs people would like to see fixed in a 2.0.3 release: As we work towards our IronPython 2.0.3 bugfix release, Dino and I would like to get a feel for which bugs left unresolved in 2.0.2 are most important for us to fix in the next release. Please let us know ASAP if there’s an issue you’d like to see fixed in IronPython 2.0.3. Thanks! IronPython unter Eclipse 3.5 mit PyDev - Veni, vidi, vici  A blog entry (in German with just a hint of Latin) from Rainer Schuster about how he bent Eclipse 3.5 (with PyDev ) to his will for IronPython development. Google translate reveals his conclusion: From now on you is CodeCompletition ...

Gestalt: Ruby, Python & XAML in your HTML pages

Silverlight makes it possible to script the browser with Python and Ruby (IronPython and IronRuby of course), but the experience is very different to working with Javascript. That could all change thanks to a new project from MIX Online Labs called Gestalt. Gestalt Gestalt is a library released by MIX Online Labs that allows you to write Ruby, Python & XAML code in your (X)HTML pages. It enables you to build richer and more powerful web applications by marrying the benefits of expressive languages, modern compilers, AJAX & RIAs with the write » save » refresh development model of the web. Amongst its features it promises: Make way for Ruby & Python, JavaScript! Gestalt lets you write Ruby & Python within script tags (or linked scripts) right in your (X)HTML pages allowing you to do everything and more you've been used to doing in the page with JavaScript. Transparently compiled and blazing fast When a user visits a page that uses Gestalt, we harness the power of th...

New JavaScript Implementation for the DLR

The Dynamic Language Runtime was announced at the same time as Silverlight. Along with IronPython and IronRuby a third, Silverlight only, language was announced that ran on the DLR. This language was Managed JScript, an ECMA compliant version of Javascript that was touted as an easy way to port AJAX applications to run on Silverlight. Unfortunately as IronPython and the DLR developed Managed JScript stagnated. It was only ever released as binaries and hasn't been kept up to date with recent versions of the DLR. Someone called it the Bastard, red-headed step-child in the DLR . However, there is now an alternative implementation of JavaScript for the DLR: RemObjects Script for .NET: The free scripting engine for .NET RemObjects Script for .NET is an embeddable engine for .NET applications that allows developers to let their users introduce written scripts that influence the behavior of the application. The RemObjects Script engine is built in a language-agnostic way, so that differen...

Choosing a DLR language: IronPython or IronRuby?

.NET developers interested in dynamic languages but still wanting to stay within the .NET ecosystem have an interesting choice - IronPython or IronRuby? Simon Segal, who has been adding scripting support to his Entity Framework profiler , has been pondering this question: Which DLR language should I choose? Is it now IronRuby vs. IronPython. For my part so far I have delved into IronRuby and started to employ it for scripting my C# applications. Why did I choose IronRuby over IronPython? It began with curiosity in the Ruby language in general and led inevitably to IronRuby. I quickly acquired a taste for Ruby but there is something nagging in the back of my mind and I can’t get to the bottom of it - “did I choose the right language” and really after all “does it matter which one I choose?” Given Pythons relationship to C and my emotional connection to the C family of languages, would IronPython have been a better choice? Certainly IronPython is further down the track and more mature th...

A Good Mix 10: WPF, .NET Introspection, the Solver Foundation, Resolver One and Cobra

Another selection on a wide range of topics from the last few weeks. Resolver One 1.5 Release Resolver One is an IronPython spreadsheet system and is the largest IronPython codebase in production. Normally a new release would be big news but we've already covered the Python console which is the biggest new feature in version 1.5. Other big new features include CSV import / export and a goto line dialog for the code editor. You can read a full list of all the improvements in the changelog . Now that 1.5 is out we're working hard on features for version 1.6. Our latest blog entry has a sneak preview of one of the coming attractions . Introspecting .NET Types and Methods from IronPython For Python methods you can use the inspect module to get information about methods / functions; like what arguments they take and so on. Methods on .NET types don't have the attributes used by inspect (although methods of Python objects defined in IronPython work fine). We can get around thi...

A Good Mix 6: Databases, the DLR and Programming Languages

Another selection of blog entries and articles on IronPython culled from the last few weeks. FBConsole 0.8.2 Released I last reported on FBConsole in August 2007, when version 0.7.2 was released . FBConsole is a "Firebird RDBMS Tool Powered by IronPython" (a Python console for the Firebird database ). This new release ( via ) is built with IronPython 2.0. Configuring the DLR for IronPython and IronRuby Another blog entry in Japanese. It is useful though as it shows you the ScriptRuntime configuration ( app.config ) needed for hosting both IronPython and IronRuby in a single application. Useful if you are using the DLR to provide user scripting and want to give your users a choice of languages to use. Cobra Programming Language April Update Another update, with accompanying release , for the Cobra Programming Language . Cobra is a .NET programming language with both dynamic and static binding, a Python inspired syntax and first class support for unit tests and contracts. As...

The Pyjama Project and PyjamaScheme

The Pyjama project is an open source sub-project run by the Institute for Personal Robots in Education , which is partly funded by Microsoft Research. The Pyjama Project The Pyjama Project is a framework for computing. At its core is an integrated editor and interactive console for writing and exploring computer science through dynamic languages. It is designed to be a simple, yet powerful, integrated development environment (IDE) for students, teachers, researchers, and regular humans, too. It runs on most any operating system, including Linux, Mac OS X, and Windows, and is built using .NET and Mono. All sources for the Pyjama Project are open and free---freely available and you are free to use them in various ways. All source code conforms to OSI approved licenses. Pyjama is built using the Dynamic Language Runtime (DLR) system from Microsoft. This means that languages (such as Python and Ruby) can share data and use a set of common libraries. For example, rather than writing a libra...

New Sample: Writing a DLR Language in C# or IronPython

As well as being the basis for language implementations like IronRuby and IronPython the Dynamic Language Runtime is intended to be a framework making it easy for YOU to implement a dynamic language that runs on .NET and Mono. So far there hasn't been a rush of languages using the DLR. The only ones I'm aware of are: IronScheme (at 1.0 Beta 3a released May 2nd 2009) Groovy DLR (at 1.0 Beta 4 released May 9th but may already be abandoned - see my previous blog entry ) Nua (Lua for the DLR) (no releases and last checkin July 2007 - so looks dead) DLR Basic (no releases and last checkin November 2008) IronSmalltalk (at version 0.1 with last checkin October 2008) IronLogo (at version 0.0.1 with last checkin January 2008) Managed JScript (Javascript) - developed by Microsoft and only ever released as Silverlight binaries. The future of Managed JScript is very unclear. Python, Ruby, Javascript (Managed JScript), Scheme, Groovy, Lua, Smalltalk, Basic and Logo would be an impre...

Groovy: A New Language on the DLR?

There was an interesting new release on a codeplex project a few days ago: Groovy DLR 1.0 Beta 4 Released Groovy is an " agile dynamic language for the Java Virtual Machine ", with Java inspired syntax and capabilities but with additional dynamic features " inspired by languages like Python, Ruby and Smalltalk ". Groovy has a Rails inspired web framework called Grails and aims to be the " JVM's defacto dynamic language ", but faces stiff competition from both JRuby and Jython . So if Groovy is a JVM language, what is it doing on .NET and the Dynamic Language Runtime? Groovy DLR is the brainchild of Gavin Grover . His website says: Groovy/DLR Recently, Gavin Grover began adding the Groovy Language to Microsoft's dynamic language runtime . He's focusing on creating a full-featured syntactic skin using combinator parsers because that's what's most lacking in (J)Groovy. Groovy's syntax is the next generation in the C language famil...

A Fairly Meaningless Server Performance Comparison

An interesting article by James Gardner comparing the performance of IronPython, Jython, Scala and CPython for serving web pages. Not only does it carry the usual caveats of all benchmarking and performance comparisons, but the version of IronPython used is the very old IronPython 2.0 Alpha 5 which still comes with Mono. UPDATE: it turns out that not only is the article using an old version of IronPython, but it advises installing Mono 1.9.1 because of the handy universal installer for Linux. Whilst this is indeed handy it is also outdated (the installer used to be built with a tool called BitRock which is non-free). The latest version of Mono is 2.4. That aside it is still an interesting read and includes instructions on how to get Mono installed and have IronPython working with the Python standard library on Linux: IronPython, Jython, Scala and Python: A Fairly Meaningless Server Performance Comparison IronPython 2.0 is a full implementation of Python 2.5 targetting the .NET platform...

The Not Python Edition: Ioke, Cobra and IronRuby

In this IronPython-URLs entry we look at four different topics on three languages; none of them Python - but all on .NET. Ioke for the CLR Released Ioke is a dynamic language created by Ola Bini , one of the core developers of JRuby (Ruby on the JVM). Ioke aims to be a highly expressive language, influenced by Io, Smalltalk, Lisp and Ruby. The primary implementation of Ioke runs on the JVM; but Ola recently unveiled the .NET (and Mono) implementation: Ioke for the CLR: Ioke E ikc is the first release of the ikc Ioke machine. The ikc machine is implemented in C# and F# and run’s on Mono and .NET. It includes all the features of Ioke E ikj, except for Java integration. Integration with .NET types will come in another release. There are several interesting pieces in ikc. Among them I can mention a new regular expression engine (called NRegex), a port of many parts of gnu.math, providing arbitrary precision math, and also an implementation of BigDecimal in C#. Cobra February 2009 Update C...

Writing your own programming language with the DLR

Benjamin Nitschke's has written a couple of posts on writing your own programming language with the Dynamic Language Runtime. The first is a long list of links and resources on the DLR and the tools (like the ANTLR parser) used in creating a programming language. The second is a very long entry comparing the performance of code written in various ways - including on top of the DLR. Writing your own programming language with the DLR I will also try to post some useful links about my recent DLR (Dynamic Language Runtime for .NET) research. I have been working a bit on the DLR before, mostly together with Silverlight, which was cool, but Silverlight was way too hard to work with and I still think it is not distributed enough. And even before that quite a bit with the Visual Studio SDK, early IronPython versions and other language implementations in .NET and even with native c code (but usually I just modified existing samples). I have also modified Lua for my own needs recently and m...

Exploring ActionScript Bytecode with IronPython

OK, so I'm not fully certain what this about - but it certainly looks interesting. AbcExplorationLib is " a library to read and write ActionScript Byte Code (ABC) files. When completed it could be used for compiled program analysis or as part the back end of an experimental compiler. It is written in F# but it could be used from other .NET languages. Inspiration for this library comes from many excellent libraries for bytecode manipulation such as BCEL, ASM, Cecil or System.Reflection.Emit ". The blog entry linked to here, is about experimenting with ActionScript bytecode from IronPython; and in particular with the bytecode for the switch statement. Support for the LookupSwitch opcode in AbcExplorationLib Given the following ActionScript code: var x; for(x = 1;x switch(x) { case 1: print("one"); break; case 2: print("two"); break; case 3: print("three"); break; case...