Scott Hanselman

dotnet repl

June 10, 2021 Comment on this post [9] Posted in Learning .NET
Sponsored By

Go get .NET 5 for Windows, Mac, or Linux, over at https://dotnet.microsoft.com/

Then install Jon Sequeria's "dotnet repl" with this one line global tool install:

dotnet tool install --global dotnet-repl 

Then just type dotnet repl at the command line. Use the Windows Terminal ideally. That will drop you here!

.NET REPL

With .NET Interactive/.NET Notebooks at the heart, consider this command-line experimental REPL (Read Evaluate Print Loop) to be a text-based notebook!

Start typing! If you make a mistake and press enter, type Ctrl-UpArrow to bring that line down to try again.

for looping over fruit

You can even add NuGet packages with #r "nuget:YourPackage"

Rendering ANSI pictures in .NET REPL

Go learn more and give feedback at https://github.com/jonsequitur/dotnet-repl. You can even run .NET Notebooks with this, as a script! This REPL supports #F and C#. Love it.


Sponsor: Extend your runway and expand your reach. Oracle for Startups delivers enterprise cloud at a startup price tag with free cloud credits to help you reel in the big fish—confidently. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
June 15, 2021 18:37
I feel like C# repl is so much easier. What does this have over https://github.com/waf/CSharpRepl?
June 15, 2021 21:18
I feel like C# repl is so much easier. What does this have over https://github.com/waf/CSharpRepl?


Probably nothing much. 🙂 CSharpRepl is great, and much more polished.

dotnet-repl is an experiment in building a multi-language REPL, so it supports F# and PowerShell, and other languages can be imported using NuGet, just like in .NET Interactive notebooks. It's also an experiment in ways to use notebooks from the command line, including with no user interaction.
June 15, 2021 22:53
I'd really like to see this C# based environment used on Azure for all of the now scripted/configured things which use some other language. Too many toy languages to learn to do things needed one or two times plus no need to cycle to the *next great thing* toy language every 3 years.
Jim
June 16, 2021 1:52
To get this going, I had to specify the version as Scott did in his screenshot :)

dotnet tool install --global dotnet-repl --version 0.1.11
June 16, 2021 8:55
Very nice! It's just missing something like LinqPad's Dump() (probably available in a Nuget package somewhere). With that it could be a lightweight replacement for LinqPad!
June 16, 2021 14:56
Speaking of LinqPad, how is there still not a good version of LinqPad for Mac?
June 16, 2021 21:54
Cool! Nice work Jon Sequeria. Thanks for sharing Scott.
June 19, 2021 3:17
Hi Jon Sequeria,

Thanks for sharing valuable information.
June 19, 2021 6:39
Amateur computer developer, I've been around computers since the monochrome screens. The REPL system is great, in the way of the DOS tool fast, efficient, powerful. Computer programming is constantly reinventing itself, I've been talking about it for 20 years on Fobec, and in the end the good ideas of the beginning find their place in the present.
Thanks for sharing

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.