InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Add a REPL Console to Your .NET Applications

Posted by Jonathan Allen on Oct 06, 2009

Sections
Development
Topics
IronRuby ,
Ruby ,
IronPython ,
Dynamic Languages ,
.NET Languages ,
Python ,
.NET ,
Languages ,
Programming ,
DLR

Microsoft is starting to push IronPython and IronRuby as the way for end users to customize their applications. Once such example is Microsoft Dynamics, which is using IronPython to allow state and local governments to create complex fee schedules. These are used when the business rules governing a decision are too complex to be represented by normal lookup tables and change to frequently to justify a traditional development cycle.

Since Microsoft Dynamics is a closed-source application, Microsoft is turning elsewhere for examples of how dynamic languages can allow users to customize their experience. Once such example is Witty, an open source Twitter client.

A novel feature in Witty is that it includes a REPL console. Exposing the console is incredibly simple. Simply instantiate a ConsoleWindow object, pass in the objects you want your end-users to be able to access, and display it.

var console = new ConsoleWindow();
console.MainRepl.AddExternalObject("T", twitter);
console.MainRepl.AddExternalObject("U", this);
console.Show();

You can see a screen shot of Witty with the REPL console on Jimmy Schementi’s blog. The source code for Jim Deville's REPL console is available on github.

For more on Dynamic Languages on .NET, check out the Pumping Iron video on Channel 9.

"Witty with the REPL console" link by Michael Krumlauf Posted
Re: "Witty with the REPL console" link by Ryan Slobojan Posted
  1. Back to top

    "Witty with the REPL console" link

    by Michael Krumlauf

    The above link is broken.

  2. Back to top

    Re: "Witty with the REPL console" link

    by Ryan Slobojan

    The above link is broken.

    Thanks for the heads-up - this has now been fixed.

    Ryan Slobojan
    Chief Editor, InfoQ