May 1st, 2014

Happy 50th Birthday, BASIC!

UPDATE: QuickVB is now open source!

The Visual Basic team joins Dartmouth and developers worldwide whose lives have been touched by this amazing language in wishing Dartmouth BASIC (and indeed the whole BASIC family of languages) a very happy 50th birthday (and many more) today!

So many of us here on the Managed Languages team got our start with one dialect of BASIC or another we couldn’t help but put together something to show our nostalgia and affection for our roots. In homage to grandpa BASIC’s 50th we give you: QuickVB.

QuickVB is powered by the .NET Compiler Platform (“Roslyn”) NuGet packages that were previewed at BUILD this year. To get started, download the source from CodePlex into a solution folder and then build and run it from Visual Studio 2013. You don’t need any Roslyn Previews installed, as NuGet package restore should pull down the required packages upon build.

When you start QuickVB, you’ll see an environment that looks quite a bit like QuickBasic:

However, this is actually a Windows console application powered by Roslyn. To light up Roslyn colorization, hit Alt-O to go to the Options menu, and hit R to “Enable Roslyn”:

Because QuickVB uses Roslyn’s semantic Classification API, it can colorize VB’s contextual keywords correctly, even in a pretty gnarly query:

And QuickVB also uses the Roslyn Recommendations API to build symbol completion lists for your cursor location as you type:

Hit F5 to run the code you’ve written:

QuickVB even shows compiler diagnostics if we leave off the Imports statement that pulls in LINQ’s Where operator:

There’s a few other surprises, but we’ll let you explore those on your own! (as a hint, the VB compiler in Roslyn is self-hosted (it’s written mostly in VB!), and QuickVB is no different. Try the “Open Self” menu item on the File menu to load up QuickVB inside of itself, and then try modifying it and running it again!)

Have fun!

Anthony, Alex, and Ian on behalf of the Managed Languages (VB, C#, F#) Team

0 comments