|
off topic Please consider ASP.NET hosting plans provided by HostMySite.com, a Microsoft Gold Certified Hosting Partner.
|
You've reached the internet home of Chris Sells, Program Manager in the Distributed Systems Group at Microsoft. I've also written some tools and done some writing, both targeted at the Windows developer. Enjoy.
Marquee de Sells: Chris's insight outlet
What is all the fuss about how you can write DSLs in Lisp?I found an interesting post on domain-specific languages and Lisp from June of 2007. It has this to say about designing a DSL:
I like these categories. I find most folks do #2 with no tooling support or #3 using XML. MGrammar in Oslo is about making #1 easier than #2 and providing the tooling support, e.g. language-specific Intellisense services. The real topic of the thread, however, is how to do a DSL in Lisp. The questioner would like to implement the following syntax: trade 100 shares(x) when (time < 20:00) and timingisright() I find this syntax to be reasonable for an event and it wouldn't be hard to imagine a system with a bunch of rules expressed this way and I could imagine a developer and a business person working together on such a system to ensure things were expressed properly. I don't think I could imagine the business person keeping up as well with syntax expressed as the answerer suggests, however: (when (and (< time 20:00) IMO, that's not a DSL -- that's just a set of function calls in an existing language. Monday, January 05, 2009 8:20 AM (2 Replies) Eat Less and Exercise: Before and After
I had been a skinny kid with a fast metabolism growing up. At 6'5" it takes a lot of food to get to full grown, even when I had only a medium build (I can't even claim to be "big boned"). In college, living in a fraternity served by a cook that believed fully in the benefits of meat and potatoes and having been born in the Midwest with a gravy ladle in my mouth, I got my "freshman 15" in the first semester and kept on going until I was the jolly fellow you see to your right (complete with the belly that shook like a bowl full of jelly).
Over the last twelve months, I tried something different and as of a coupla week ago, I look like the guy on the left. I called it "eat right and exercise." It sounds revolutionary, I know, but I've lost 60 pounds over the last year and I've kept it off (even after the visit to my grandfather over the holidays!) The idea isn't to diet at all, but to change your habits. I can't say that I'm expert enough to recommend any of this to you, but here's what I did: Stop Eating When You're Full. This was the hardest one to learn. In college, I learned up to drink and, most importantly, when to notice when it's time to stop drinking. However, it took me 'til I was 38 to learn how to tell when I was full. This involves eating slowly and being very ready to leave food on your plate (which I always try to do now). There's Always More Later. This is the other key to stopping eating. As much as I might like something and want to finish it, I had to realize that there would always be more of whatever it was later. I learned to feel good about leaving food uneaten, no matter how good it was. Eat Better Food. If you have to choose between eating 1000 calories of Doritos or of broccoli, I think we all know the right choice to make. The key is, making it. I've had to learn to like salad, fruits and vegetables, which I'm still working on. I'm always trying new things to learn to eat things that are better for me. Don't Buy Grazing Food. If I'm doing something I don't like or am bored or reading or watching TV or any number of other things, I can easily eat chocolate or chips or any other manner of things that are bad for me, even if I'm not hungry. I have a hard time saying "no" to an unhealthy snack when I'm watching a movie, for example, so I don't buy them. Instead. I buy apples and applesauce and melons and other things that are good for me so that if I have to snack, there are only good things available. Eat Lots of Meals. This one is counter-intuitive, but I find I do better if I eat a small amount every few hours than larger meals three times a day. In general, if I'm hungry, I eat and if I'm full, I stop. It's really just that easy. Don't Deprive Yourself. If you want a piece of chocolate or a chip or whatever it is that you crave, then have it. Life is short and there is a variety of wonderful things to enjoy. Don't gorge yourself -- everything in motivation -- but don't make yourself crazy, either. I find it makes me feel good to eat a piece or two of my grandmother's famous fudge and it feels equally good to stop eating it. Exercise Regularly. This is one of my major failings with The Geek Diet. I was depriving myself of calories, but I wasn't boosting my metabolism, so my body was just adapting to fewer and fewer calories. These days, I try to swim 2 miles/week and that seems to keep me at my fighting weight. Mix It Up. I find I'm happiest eating a bunch of small portions than one or two large portions at a meal. I like variety, so I like a little bit of a few things. Also, to make sure that my body doesn't get used to my level of exercise (it's getting easier and easier to swim for distance), I try a variety of exercises. For example, I just did a 90 minute hot yoga class the other day (I thought I was gonna die) and I regularly do sprints in the pool, going as fast as I can. The latter's useful because it always sucks, no matter how fit I get, so it's almost more than I can handle. Commit. The key to making anything happen is to decide it's going to happen and then route around obstacles until it does. The days I swim without resting or swim a mile when I normally go half are the days I decide to do so. The key to weight loss or any other accomplishment is first to commit. Don't Beat Yourself Up. Didn't do as much exercise as you wanted this week? Had a few too many Twinkies? So what. You're human. Let it go. Don't give up. Do better today. The whole point of all this is that it's not about a temporary diet, but about changing my habits permanently. I still have 40 pounds I'd like to lose, but I don't obsess about it. In fact, I haven't weighed myself in months. And even if I never do lose those pounds, I'm down from a 44 waist on my pants to a 38. If I do nothing but stay there, I'll be happy as hell with myself. I love that most of these tips are just like Scott's newsflash -- gives me some validation. Do you have tips to contribute? Tell me about them. Sunday, January 04, 2009 4:47 PM (4 Replies) Martin Fowler: DslExceptionalismI love what Martin has to say on the topic of designing DSLs:
When you're ready, Oslo lets you build DSLs to be as simple or as complex as you like. Tuesday, December 30, 2008 4:47 PM (0 Replies) Spirited Discusson of Oslo on stackoverflow.comJoel Spolsky and friends have started a developer question/answer board and they've started to get some Oslo traffic. Jump on in; the water's fine. Tuesday, December 30, 2008 4:41 PM (0 Replies) Jon Flanders Builds XLANG in MGrammarIt's cool to see an MGrammar for a real-world language (XLANG). Enjoy! Tuesday, December 30, 2008 4:39 PM (0 Replies) Creating a Logo / Turtle Graphics Textual DSL using Oslo MGrammarJason Hogg has posted a very cool Oslo DSL and an interpretter for doing Logo Turtle Graphics. He had this to say about MGrammar:
Thanks, Jason. We try! Tuesday, December 30, 2008 4:37 PM (0 Replies) Shawn Wildermuth on OsloShawn's been doing a bunch of Oslo work on his web site:
Enjoy. Tuesday, December 30, 2008 4:31 PM (0 Replies) Jeffrey Juday Exploring the Oslo RepositoryJeffrey has a nice hands on intro to Oslo focusing on the Repository:
Check it out! Tuesday, December 30, 2008 10:41 AM (0 Replies) Erik Stepp provides the question for Oslo's "42"I'm just catching up a little after one set of holidays and before another one on Wednesday and I noticed Erik Stepp's blog post entitled "Oslo == 42" in my inbox. In his post, he provides a lovely discussion of what Oslo is and why we built it, giving us a concrete example from his own development life. He got it pretty much dead on. Check it out. Tuesday, December 30, 2008 9:31 AM (0 Replies) Parsing relative and absolute dates with MGrammarDilip Krishnan has built a lovely little date parser that supports absolute dates like "6/2/1969" (just like DateTime.Parse already supports today) and relative dates like "today" or "next Monday" or "5 days from today". I find myself using relative date expressions like these all the time in Outlook and I've love to have them in every app I use that does dates. With Dilip's parser and the Oslo SDK, you can add it to your app. Good work, Dilip! Monday, December 22, 2008 4:57 PM (0 Replies) If you liked Zork, you'll love Spork!Spork is a sample of an end-to-end application using M and the Repository. It starts by defining a set of M types that describe the data needed for a text adventure along the lines of the famous Infocom game Zork (and hence the corporate bad-café-inspired name). The M instances are generated by running a custom compiler developed with the VBA (Visual Basic for Adventures) MGrammar grammar. We also provide a runtime driven by adventure data loaded into the Repository in multiple versions of the types called AdvRunner. Follow along with the video or with the ReadMe see Spork in action. Enjoy! Monday, December 22, 2008 3:50 PM (2 Replies) Lang.NET + DSL DevCon = JoyThis year, we’re thinking very hard about putting the Lang.NET conference and the DSL DevCon at the same venue (the research center on the Microsoft Redmond campus) in the same week. The idea is that people interested in general-purpose language design and development can come to Lang.NET and the people interested in domain-specific languages can come to the DSL DevCon and for folks interested in both, the DSL DevCon will start right after Lang.NET, so folks can stay a little longer and come to both. Also, the conference chairs on both conferences will make sure to keep the content unique across the two conferences. We think that’s a good way to make sure the conferences complement each other and helps keep people’s schedules sane and their travel costs lower. However, I have two questions for you: 1. Traditionally, Lang.NET is 3 days and a DevCon is 2 days. Because of the overlap of the content (languages), we were wondering if folks thought it would be a good idea to do 2.5 days of Lang.NET and 1.5 days of DSL DevCon this year instead, doing both conferences in 4 days instead of 5. What do you think? 2. If we linked these two events like this, will you attend just Lang.NET, just DSL DevCon or both? Post your comments on this blog entry. Vote early, vote often! Thursday, December 18, 2008 5:15 PM (4 Replies) Notation, Notation, Notation!Markus Völter has posted some interesting model-driven design guidelines, my favorite of which is "notation, notation, notation!" Since Of course, since Oslo provides MGrammar to let you build the notation of your choice, I'm hardly unbiased. : ) Wednesday, December 10, 2008 6:40 AM (0 Replies) .NET Rocks! Oslo is LoveCOM spread the love between developers of multiple languages. Oslo spreads the love between domain experts, developers and IT folks. Check out show #401 of .NET Rocks for the how and the why. Enjoy. Tuesday, December 09, 2008 10:46 PM (0 Replies) Mr. Epl on the brainI've been writing my MSDN Magazine pieces introducing Oslo and spending a great deal of time in Mr. Epl mode inside Intellipad. So, at 1:23p on a Sundary afternoon, I'm getting a little loopy, which is manifesting itself as me repeating famous lines from popular culture, only substituting Mr. Epl's name, e.g.
Did I mention I'm doing the voices, too? Sunday, November 16, 2008 1:23 PM (1 Replies) SpankyJ is an Oslo Star!SpankyJ (Josh Williams) is a star developer on the Oslo team (specifically the MSchema compiler) and he's been doing some very cool stuff with M. Firstly, Spanky's the author of the Mr. Epl tool, which is a Read-Evaluate-Print-Loop program for interacting with M (M-REPL => Mr. Epl -- cute, eh? When we used to call "M" "D", it used to be Dr. Epl. If we change it to "S", we'll Senór Epl! : ). Mr. Epl ships with the Oslo SDK, so if you've installed it, you can find it in C:\Program Files\Microsoft Oslo SDK 1.0\Bin\Intellipad\Samples\Microsoft.Intellipad.Scripting.M\MREPL.exe or you can execute it directly inside of Intellipad with the MScriptMode mode. For a demonstration (and an explanation of how to get MScriptMode working in Intellipad), Spanky has recorded a very nice Mr. Epl screencast. Highly recommended. Secondly, Spanky has just released a library for taking the output of MGrammar and producing a graph of .NET objects via XAML. He's got a nice screencast of using it to create something simple to give you a feel, then he moves right into a natural language processor for creating WPF windows and controls interactively. The ability to type text that translated into WPF without using angle brackets demonstrates the potential for DSLs very well, I think. A few notes when watching Spanky's screencasts:
Anyone interested in Oslo should absolutely subscribe to Spanky's blog. I know I have. Saturday, November 15, 2008 9:50 AM (2 Replies) Syntax Coloring for Your Custom Mg Language with IntellipadJustin Bailey shows how to hook up custom syntax highlighting in Intellipad for your MGrammar language. Very cool! Thursday, November 13, 2008 8:10 AM (0 Replies) tvrss.net + uTorrent + FiOS + WHS + 360 = DVR BlissSo, the other day, Windows XP SP2 destroyed my Windows Media Center Edition install that I've been using for years and absolutely loved. It let me record all my favorite shows on two separate tuners and I could watch them on the TV attached to my MCE box, from all the PCs in my house and from my XBOX 360. Losing it was a huge blow, especially since it was clear I'd need to repave and I was swamped with PDC and post-PDC work (damn those MSDN Magazine deadlines!). A little research revealed the following facts:
All of this means is that if I were to schedule episodes of say, Burn Notice, to be recorded by uTorrent and dropped into the Videos\TV\Burn Notice folder of my WHS box, I'd be able to access those and play them back on my XBOX 360 even more simply then I could access video from my MCE box, because I don't have to start up the Media Center software first -- access to shared folders is built right into the XBOX 360 menuing system. And I could have all of this in HD (no CableCard required) without commercials and without regard for how many tuners I have. This is all free and, if I don't want to watch live TV (the Superbowl was the last time I did), then I don't even need to spend $55/month on cable. Plus, when combined with my photos, music and ripped DVDs, all of which are also stored on my WHS box, and streaming movies I don't yet own, I could access all of my digital media from my XBOX 360 (attached to my 46" LCD panel) and from all of my PCs simply and quickly. Of course, I would never record my favorite TV programs like this, because it's very much a copyright violation and therefore highly illegal. But if I did, wow, it would rock... Why do I need cable again? Wednesday, November 12, 2008 6:44 PM (3 Replies) Rocky on OsloRockford Lhotka had this to say about Oslo:
Rocky on, Rocky! Wednesday, November 12, 2008 3:27 PM (0 Replies) Designing a language is hard; implementing it shouldn't beFrans Bouma has an interesting point: Designing a language is hard, and M won't change that. And he's right. For many domains, a DSL can make expressing what's important easier so that the developers using the DSLs can communicate between themselves and to a computer with fewer lines of code, making it easier to read, check and maintain. Many (arguably most) domains live without a DSL, instead encoding design decisions into general purpose languages, adding unnecessary ceremony to the essence of what's being decided, thereby obscuring it. Does M making designing a language easier? No. It's still hard to design the syntax of a language. Does the M family of languages and the associated tools make it possible for more developers to add DSLs to their domains, letting them concentrate on the essence their language and reducing the Weird Science-like ceremony to bring it to life? We hope so. You'll have to let us know. Tuesday, November 11, 2008 10:55 AM (0 Replies) More Oslo Reactions: What “Oslo” is and is notLars Corneliussen (not the wonderful Lars that did a cameo at the Repository & Schemas PDC talk about 8 minutes in) did a nice overview of Oslo. It's amazing to me how well the vision and details of the platform came through at the PDC. General-purpose modeling is a new thing for mainstream developers, but at least the developers that we've heard from so far seem to be open to the idea. Tuesday, November 11, 2008 10:42 AM (2 Replies) Ted Neward Explores MWhen I was an external to Microsoft, I used to see new Microsoft technologies and have several reactions: wonder, awe, lust, hate, confusion, apathy. Really, Microsoft was a harsh mistress that caused all kinds of reactions. I've been heads down for 3.5 years working on Oslo, so seeing other peoples' opinions from inside of Microsoft is very enlightening. Ted Neward has an Oslo opinion that I enjoyed reading, even if it wasn't all positive. Thanks, Ted. Tuesday, November 11, 2008 10:36 AM (0 Replies) News: How modeling will change programmingBurley Kawasaki is a Microsoft marketing person, it's true, but he also really understands the point of Oslo. Enjoy. Tuesday, November 11, 2008 10:27 AM (0 Replies) Three-Pane MGrammar Development in IntellipadRoger Alsing has posted a discussion of how Intellipad's support for MGrammar development makes writing DSLs easier but showing you what parsers and how as you update the input file and the grammar file itself. Personally, I'm a huge fan of seeing something work as I type. Think of it as "holistic intellsense." The SQL generation in Intellipad works the exact same way. I find it a huge help. Tuesday, November 11, 2008 10:22 AM (0 Replies) Another Oslo MGrammar Sample: WatiNTorkel Ödegaard has done a very nice, detailed look at created a DSL in MGrammar for the WatiN browser automation library, including a look at the code he used to parse the Abstract Symbol Tree produced by MGrammar to do something useful. Tuesday, November 11, 2008 10:18 AM (0 Replies) |
|
home & news
interviews
tools
the spout
writing
fun
colophon
news
contact
off topic
This page is copyright (c) 1995-2005, Chris Sells. All rights reserved. No warranties extended. Some assembly required. Void where prohibited. You may link to this site freely from your own site. You may quote small excerpts from this site, but please include a link to the original source on this site. |