BT

LiveRun – Taking REPL One Step Sideways

| by Jonathan Allen Follow 576 Followers on Nov 25, 2008. Estimated reading time: 1 minute |

REPL or Read-Eval-Print-Loop is an interesting way to write programs. Instead of doing it all at once, then running the results, you write it in fragments. Each fragment builds on the one before, with the environment never being reset like you would with a typical write-build-run cycle. For most .NET programmers, the only true REPL style coding you usually find is SQL.

Of course there is Edit-and-Continue in Visual Studio, but that is severely limited and there are numerous ways to "foul" the run and trigger the need for a full rebuild/restart. While you cannot just tack-on a REPL in .NET, there are still options for REPL-like functionality. Lucian Wischik shows this with his LiveRun add-in.

LiveRun will will pick up all the code in the current text window, compile it to a temporary location, then run it. After waiting two second, it will repeat the process. This is all done without interfering with the developer's train of thought.

So what is this good for? Well, primarily for writing demos in front of a live audience. Instead of constantly stopping to run the program, the audience can see effect of the changes in almost real time.

Lucian Wischik offers the full source for LiveRun on his blog.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT