One of the major reasons that I decided to come to work on the Oslo team was the experience I had with what was going to become MGrammar. I was interested in prototyping some language and compiler design ideas, and I knew that the Oslo team had some technologies that might help me out, specifically a parser generator. They helpfully pointed me to their source code, I enlisted, built and started to play around. I’d been building some parser technology by hand, but I quickly discarded it once I started playing around with MGrammar in Intellipad. In addition to giving me a bunch of things that I needed, it was also just really… fun. I mean, it was cool to bring up a buffer, start hammering on a syntax and then put in an example and see the result pop up. Or, as was the case most of the time, not pop up. Tweak, tweak, tweak and then… boom! the result shows up.
This storyline is one that I’ve heard a number of times internally and even seen externally a time or two. People just have a great time playing around with grammars and languages and seeing what they can get to come out. There’s frustration, sure, but then there’s also a big payoff when you finally see it working—look what I created!
I hadn’t really thought a lot about it until I came across a presentation that Daniel Cook (author of the Lost Garden blog) gave at an OfficeLabs meeting entitled “Mixing Games and Applications.” He says it a lot better than I can, but I intuitively think that I (and others) enjoy fooling around with MGrammar in Intellipad precisely because it taps in to game playing part of our brain. I’m not sure how to capitalize on that further, but it’s interesting food for thought…
As some readers have noticed, I’ve been conspicuously silent since I moved over to the Oslo team. Some of this had to do with getting onto a new blogging engine, some of it had to do with various distractions like jury duty, but a lot of it had to do with the fact that Visual Basic 10.0 has gotten to a pretty stable state (so there isn’t so much for me to say any more) and I am just getting off the ground with Oslo. Not having much useful to say, I figured I’d be better off saying nothing at all rather than continuing to blather on and on about nothing in particular (that’s what Twitter is for).
Part of the process of moving over to Oslo was figuring out exactly what my role was going to be. There’s lots of cool stuff going on and a lot of smart people with strong ideas about things, so I knew it would take a while for things to settle out. Things will still probably evolve over time, but the area I’ve spent the most time on, and the thing I’ll have the most influence on for the time being, is MGrammar. It’s been an interesting experience because I’ve had to relearn a bunch of the theory around parser generation that I had forgotten in my time in VB (since we had a hand-built recursive descent parser). But it’s been enjoyable, and I think there are a lot of neat things we can do with it. So stay tuned on that.
Someone forwarded me Kevin Moore’s 20 questions/thoughts around MGrammar, and I thought answering some of those questions might be a good entree into blogging about my new job. I won’t address all of his questions, but the interesting ones, in my opinion, were:
Could C#/VB implement their compilers using MGrammar? Should they? Would they?
I believe that, as the languages stand today, C# could implement their parser using MGrammar but VB couldn’t. The reason why VB couldn’t is a pretty technical issue relating to the embedding of XML into VB which we may end up solving as well, but given the hacks that we (VB) had to do to the hand generated parser to get it to work I don’t think that reflects badly on MGrammar (or VB for that matter). The bottom line is that the parser generator is certainly powerful enough to handle an industrial-strength language. Whether the C# or VB teams should or will do anything with MGrammar is really a question for them. Both languages have hand-built parsers which allows an extraordinary degree of control over the behavior of a parse and, in particular, error messages and error recovery. They may be loath to give that up, but we’ll see.
Where is the MGrammar for C#? …for VB? …for CSV? …for VS solution files? …for XML?
In general, the Oslo team is just one little team and can only do so much. Although we endeavor to provide you with the maximum number of samples, in truth we are limited in what we can do at any one time. You should expect to see more samples as time goes on. I’ll also note, though, that some of those languages do present interesting challenges to a parser generator. I’ve already covered VB, but XML also has challenges, which I think is really a subject for another entry.
There should be standardized or defacto escape mechanisms for existing grammars.
If I understand the point here correctly, what’s really being asked for is composability of grammars. This is a difficult, but interesting, area of work. To use an example I’ve already referenced, there were a lot of challenges integrating XML into VB because the languages were very different, even down to the lexical level. Having languages compose in some kind of simple way (even to do things like add or override parts of an existing grammar) is an open question that we’re very interested in but we’re still working on.
Will there be tools to go back from a logical model (MSchema) to the input format?
This is on our radar, but we don’t have an answer at the moment. It’s a very natural and logical thing to do, but (of course) running a grammar in reverse is not a trivial matter. I’m not sure we can get to a point where we can reverse a parse automatically, but we do want to provide people with a way to do this in as simple a manner as possible.
Where is the community site for MGrammar?
Well, we’ve got the Oslo Developer Center and the Oslo forums. If you want to start a community site, by all means go ahead!
Any news with Mono? Is Miguel interested?
I think you’d have to ask Miguel that…
Are you making a play to make MGrammar a standard? I’ve heard yes, but just wanted to confirm.
What we’ve committed to is releasing the MGrammar specification (well, actually, the whole M language specification) under the Open Specification Promise. That’s the only commitment we’ve made so far regarding MGrammar’s specification, but it’s a pretty big one.
How is the computer science behind MGrammar?
Pretty good, and I expect it to get even better. Expect to hear more here and elsewhere about internal specifics as time goes on (it’s a little more than can be covered in one blog post).
I hope that answers some questions, and feel free to ask more questions here or on the forums. Thanks!
Things have been quiet around here for a number of reasons. One of the more important was that I really, really, really wanted to get off of the ancient .Text blog engine I’ve been on forever and I was loath to add a lot more content until I could get moved over. I decided to move to Subtext since it was very compatible with .Text (although its migration code for .Text appears to be completely untested as it contained at least one blocking bug and I had to do some of it by hand), but was blocked for a while due to some issues between Subtext and my hosting provider that are now cleared up.
So, assuming that everything still works, I should be back in business! Do let me know if there are any problems you run into!
Now that we’re past the PDC, there are a bunch of video resources coming out on VB 10.0 and Oslo. Here’s a roundup of what’s available so far:
The Pearson folks also recorded some vidcasts they call OnMicrosoft. If you go to the previous link, you can see all the videos posted, but the ones of interest to this blog are:
There are other Oslo vidcasts on the site, so check them out as well.
Yesterday I gave my valedictory address on Visual Basic at the PDC. I think the talk went well and it was a lot of fun, if not a little sad that it’s one of the last times I’ll be giving a talk about Visual Basic. We covered a lot of exciting stuff, some of which should be familiar to readers of the blog. I’ll let people know when the video is up on the Channel9 page for the talk, should be some time today. For those of you who don’t want to sit through the talk it went something like this:
- First, we talked a bit about the role of Visual Basic at Microsoft as the language that makes Microsoft platforms really accessible to programmers.
- Then we segued into talking about the increased commitment that the languages groups are making to ensure that Visual Basic and C# coordinate language features so that users of one language aren’t left out in the cold when the other language adds some useful feature. This isn’t to say that we’re going to do things in exactly the same way, or even that the languages will have exactly the same feature set, but that we’re committing to ensuring that the fundamental capabilities in the languages stay in better sync than they have over the previous eight years.
- Then Lucian did a really wonderful demo of VB 10.0, which is shipping in Visual Studio 2010. He showed (IIRC) the following features that should be familiar to the readers of this blog: array literals, collection initializers, automatic properties, implicit line continuations, statement lambdas, generic variance, and a feature that embeds primary interop assembly types in your assembly so you don’t have to deploy the PIA. I may have missed some, so check out the video when it’s posted!
- Finally, we talked about some of the trends that we see affecting Visual Basic going forward and talked about some of the work we’re starting to do for post-VS 2010 to move the Visual Basic compiler to managed code and open it up to the world so that you can take advantage of the services that it provides.
If you attended the talk, please evaluate the session! It helps me become a better speaker and helps us give a better PDC. And feel free to stop by the tools lounge today, I’ll be hanging out there most of the day!
The Oslo dev center on MSDN is now up, and the Oslo CTP is available. You can also check out Models Remixed for even more information and keep your eye on the M language blog. More to be revealed tomorrow…
As difficult as it is to say, I wanted to let my loyal readers know that after a decade spent working on Visual Basic, I’ve made the decision to change jobs at Microsoft.
It's somewhat hard for even me to imagine just how long I've worked on Visual Basic. I joined the Developer Division (VB's home) over 11.5 years ago to work on OLE Automation. A year and a half after that, I moved over to the VB team proper to work on the compiler's code generator just as we started the move to what would become .NET. In some ways it seems like just yesterday, but in many other ways it feels like several lifetimes ago. In the intervening decade, I've worked on 4.1 versions of Visual Basic (including our forthcoming version), during which time an amazing amount of stuff has happened to the VB language, the VB community, Visual Studio, and development tools in general. The development world looks very different than it did when I started, and that's generally been a wonderful thing.
But as the current release started to wind down from a design perspective, I started asking myself whether it was time for a change. And, after thinking about it quite a bit and talking to quite a few people, I decided that it was. As much fun as it has been to work on Visual Basic, I felt the need to be doing something different than what I've been doing. And so I made the decision that it was time to move on. Sort of.
You see, although the fact that I’m leaving is a big deal in some ways, it’s not as big a deal as you might expect. Even as I physically move to another team, in many ways I’m not really going anywhere. I’ll be carrying with me a title of “Visual Basic Language Designer Emeritus,” meaning that I will continue to participate in the VB language design process and will continue to work to ensure the VB language specification is kept complete and up to date (although I will no longer have primary authorship responsibilities). I’m also still planning to give the VB talk at the PDC in October and talking about all the exciting things we’ve done for the upcoming release plus some ideas about where things will be going in the more distant future.
As to my next challenge, well, there isn't a whole lot I can say about that... yet. I've got some personal ideas rattling around in my head that I'm going to get some time to spend working on, but my day job is going to be working with guys like Douglas Purdy, Don Box and Chris Anderson on the Oslo product. In particular, I'm going to be helping out with the subject of this talk. Expect to hear more from me about it once we've gotten to the PDC.
Even though I’ll be spending a good bit of my time on Oslo, though, I’ll still going to be an active member of the VB community. I’ll still be talking about VB on this blog, opining on the language and it’s future, and, I’m sure, continuing to answer lots of questions. I’ll be continuing to use VB and am really excited where the product is going in this release and the next one (but more about that at the PDC!). Over time, I do expect my place in the VB community will fade somewhat as the new blood on the VB team really starts to come into its own, but for the time being things will continue to go along much as they have been. And, of course, VB will always have a special place in my heart.
This isn't really goodbye but I did want to take the opportunity to thank all of the people out there who have used VB, who've read my blog, and who've written me or talked to me about VB. The VB community has been one of the major reasons that I have enjoyed working on VB so much (and for so long!), and every one of you have played a major role in that. There have certainly been controversies, disagreements, and blow ups, but I really think that VB has one of the finest user communities that I’ve ever participated in, and that I will be lucky if I work on products in the future that attract such a passionate, intelligent, and caring group of people. I can’t say how much I appreciate all the great times that everyone has given me over the years!
So, the blog will continue, I'll still be talking about VB, and soon I’ll have some additional interesting and exciting things from my new job to talk about too. The next ten years should be just as fun as the previous ten have been!
While I was hanging out at the Addison-Wesley booth, I picked up a copy of two updated editions that I’d been eyeing. One is the updated C# Programming Language specification that includes a lot of hard work by Mads:

And the other is the updated Framework Design Guidelines:
Both look just awesome. I think they’re also supposed to be giving out this sooner or later:

So I can hopefully pick up one of those too!
I just wanted to give a shout out to my fellow Oslo employee Vijaye Raji whose Small BASIC project just launched on the new DevLabs site. It’s a version of BASIC targeted at truly beginning programmers, and I think it’s a great example of how BASIC can be utilized to make things very simple and easy to use. I got the chance to see Small BASIC in action being taught to high schoolers and it was wonderful to see the kids start to make the connection between what they were doing and what they could do. It’s a great project, and I hope it goes far!
I didn’t realize I’ve been so silent about the PDC! I’ve been struggling to get off of .Text and on to Subtext for my blogging engine, and so I’ve been avoiding posting because “I’ll wait until I get moved over to the new engine.” Pffffft! Anyway, I’m going to be doing a number of things at the PDC, so if you’re going to be in LA next week, stop by and say hi!
- I am co-presenting “Future Directions for Visual Basic” with Lucian on Tuesday at 5:15pm in room 406A. Do stop by and let’s chat about where Visual Basic is going! Also, feel free to go to the Channel9 page and add comments about what you’d like to see and if there are questions you’d like addressed. If you’re not going to the PDC, check the page after the talk for video and discussion.
- I’ll be at the “Ask the Experts” dinner on Wednesday night in Hall G. I’ll be sitting with Visual Basic, although I might wander over to wherever Oslo is at some point…
- I’ll be trying to attend the various Oslo talks.
- I’ll be at the Tools and Languages lounge on Wednesday from 2-5pm for sure, and I’ll probably be hanging around there a lot otherwise.
I’ll be trying to keep up with my Twitter feed (my username is paulvick) so feel free to ping me if you are around. And I’ll blog some more after my talk.
Hope to see you all there!