My first experience with computers happened at university while I was interning with a local government agency. It was on an old Compaq 386 and the “programming environment” was dBase III. The minute I typed in …
I was completely hooked. I was blown away by how easy and versatile it was to create, browse and manipulate data with just a handful of commands in a completely interactive environment. I like to think that I built a successful career on the foundations of dBase, and later FoxPro.
With all the recent interest and advances in bots and “conversational computing”, I think we are about to enter a new golden age of REPL’s. With that said, I am going to write a series of articles that demonstrate how easy it is to create a useful REPL from scratch. This first example focuses on the Microsoft .Net programming environment. Before I start, I know that many readers will point out a ton of very fine and useful REPLs for .Net. I am aware of most of them and this example is not meant to suggest that any of these would not be better suited for your own tasks. The purpose of this article and subsequent ones is to take the “minimalist” approach so that you create something functional without relying on a bunch of external dependencies.
So lets get started … here’s the entire code:
//let's add a few useful namespaces
//create a global object/propertybag
Save this code in a text file … dotnetrepl.js, for example
To compile your REPL, open a command prompt to the location of your dotnetrepl.js and type:
This will create a dotnetrepl.exe in your directory and you are good to go with your new REPL.
I have prepared a short video that illustrates a few other examples:
Hopefully you found this quick introduction useful. In subsequent articles, I will build a series of simple, yet useful REPL’s that you may use as starting point for your own computing discoveries.