Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Interactive interpreter for .Net?

Does anyone know of any interactive interpreters for .Net?  It would be very useful to have the ability to pull up an interactive interpreter to evaluate some short pieces of code (for example, when learning about things like DateTime.Parse).  From the little exposure I've had to some of the reflection functionality, it seems that it should be possible.  I don't particularly care what language is used.

SomeBody
Sunday, June 01, 2003

VB6 had an "immediate" window which, when the program was running, could be used exactly as you describe. I used it countless times to test out and debug COM objects.

I wonder if there is a similar thing in VS.NET when you have a VB project in the debugger...

Brad Wilson (dotnetguy.techieswithcats.com)
Sunday, June 01, 2003

Somebody,

At the command prompt in the Command window, type >immed.

Hey presto, you have an Immediate window, but be aware that this only works interactively when you're stopped at a breakpoint. With Visual Studio 2003, you also get Intellisense in this window.

HTH,

Mark
---
Author of "Comprehensive VB .NET Debugging"
http://www.apress.com/book/bookDisplay.html?bID=128

Mark Pearce
Monday, June 02, 2003

Potentially useful: Dotnet Scripting Host (http://www.dotnetframework.de/scripting/dotnetscripting/dsh.en.asp) or Toolsack DotNet Script Host (http://www.toolsack.com/documentation/dotnetscripthost/)

Mike Gunderloy
Monday, June 02, 2003

I'm aware of the stuff that works under the debugger but was hoping to avoid having to keep an instance of VS.Net around for the sole purpose of sitting at a breakpoint.  If was going to do this, I could just keep a dummy project around to modify and run.

Toolsack is exactly what I was looking for (though it would be nice to be able to write to the output window rather than popping up message boxes).

Thanks for all the help.

SomeBody
Monday, June 02, 2003

Hi SomeBody,

You can write to any pane of the Output window within code, and even create your own custom panes - there's an example of this in the Visual Studio documentation. But I'm not sure if this is feasible from a scripting host.

Regards,

Mark
---
Author of "Comprehensive VB .NET Debugging"
http://www.apress.com/book/bookDisplay.html?bID=128

Mark Pearce
Tuesday, June 03, 2003

That's not a bad idea.  Perhaps it could even be integrated with the source editor -- selecting a few lines of code and executing them on the fly.  I'll take a look at the docs.  Thanks again.

SomeBody
Tuesday, June 03, 2003

I use Rich Hickey's DotLisp:
http://www.richhickey.com/DotLisp.htm

An example -- this is probably the best one-liner, and I use it quite often:

(prns (Encoding:ASCII.GetString (Convert:FromBase64String (clip-text))))

It displays the content of a Base64 encoded email body that I've copied from a message that is probably spam.

Mark Hurd
Friday, June 13, 2003

There is now an open source project shown on the MS website in the .Net area. It appears to be a interprative environment supported by the user community. Forgot the name but it was very visible in June 2003, so go see for yerself.

Arak Leatham
Monday, July 07, 2003

*  Recent Topics

*  Fog Creek Home