oslo

January 8, 2009 oslo

Dealing with the Visual Studio 2010 expiration in the WCF and WF 4.0, “Oslo”, & “Dublin” PDC08 Virtual Machine

If you’ve been using the WCF and WF 4.0, Oslo”, & Dublin” PDC08 Virtual Machine provided on the PDC08 Goods Disk, you’ve probably noticed that Visual Studio 2010 within the VPC expired at the end of December and you are presented the following message The evaluation period for Visual Studio Trial Edition has ended”.  Below are details on how you can export your data and get the image working again.

The work around involves creating a new differencing disk and new virtual machine configuration file and then disabling the clock synchronization between the host and guest OS.  In the end you will have a fresh virtual machine that believes it is 10/10/2008 and the clock will only increment when the machine is running.

NOTE: This workaround assumes you have not altered the PDC08-CSD.vhd” file that was marked Read Only on the PDC08 Goods Disk.  If this file has been altered, the work around may not work.

1.     Export the data you want to keep from the VPC image.  This can be done using the Shared Folders” feature of VPC 2007 to copy the data to your host and then copied into the new image at the end of this process.  See the Share a folder between a virtual machine and the host operating system” topic in VPC 2007 Help for more details.

2.     Shut down the Virtual Machine and discard your changes. At the end you will end up with a fresh, new image but you need to discard any saved changes so that you can alter the VMC file later in this process.

3.     Create a new differencing disk.

a.     On the Goods Disk” search for the PDC08-CSD-WorkDisk.vhd file and rename it to anything you want.

b.     Launch VPC 2007, click File, select Virtual Disk Wizard and click Next.

c.      Select Create a new virtual disk” and click Next.

d.     Select A virtual hard disk” and click Next.

e.     Store the new disk in the same folder where you found the PDC08-CSD-WorkDisk.vhd file and give it the same name.  Click Next to continue.

f.       Select Differencing” and click Next.

g.      Locate the PDC08-CSD.vhd” file in the same folder where you found the other vhd file, select it and click Open and Next.

h.     Click Finish and then Close

4.     Create a new Virtual Machine.

a.     Launch VPC 2007, click New and click Next.

b.     Select Create a virtual machine” and click Next.

c.      Click browse and navigate to the same folder where you created the new PDC08-CSD-WorkDisk.vhd file in step 3 above.

d.     Create a new vmc file with any name you like and click Save, then click Next.

e.     Select Windows Server 2008 in the Operating System dropdown and click Next.

f.       Select Adjusting the RAM, click Next, set the amount of RAM you want to allocate (we allocated 1536 in the original virtual machine) and click Next.

g.      Select An existing virtual hard disk” and click Next.

h.     Click browse and select the new the new PDC08-CSD-WorkDisk.vhd file in step 3 above and click Open.

i.       Check the Enable undo disks box and click Next.

j.       Click Finish.

YOU MUST DO STEP 5 BEFORE LAUNCHING THE IMAGE OR YOU WILL HAVE TO DO STEPS 3 & 4 AGAIN.

5.     Disable the host OS synchronization of the VPC.  This is a change to the PDC08-CSD.VMC file that disables the clock synchronization between the VPC and the host OS.  This means that time in the VPC moves forward only when the VPC is being used. As a result, you will have over 2 months of runtime (not wall time) for a fresh VPC.

a.     Find the PDC08-CSD.VMC file in the same folder where you found the PDC08-CSD-WorkDisk.vhd in step 2.

b.     Open the file in Notepad and made the change highlighted in RED below:

<integration>
    <microsoft>
        <mouse>
            <allow type=“boolean”>true</allow>
        </mouse>
        <components>
            <host_time_sync>
                <enabled type=“boolean”>false</enabled>
            </host_time_sync>
        </components>

Bunch of other stuff that I am skipping over to save space…
    </microsoft>
</integration>

c.      Save and close the VMC file.

6.     Launch the Virtual Machine in VPC and repeat step 1 to create the Shared Folder for copying your data back into your new image.

Your virtual machine will now show a date of 10/10/2008 and will only increment when the virtual machine is running.

One important note:  Don’t attempt to join the VPC to a domain since the domain will set the time within the VPC and thus cause Visual Studio to expire.

Many thanks to Jeff Beehler for this information which he posted on his blog, Brian Keller and his detailed description of the various activation messages associated with the CTP as well as to Virtual PC Guy who provided the original information on how to disable the VPC clock synchronization. 

If you’ve converted this VPC image to HyperV following Grant’s instructions, be sure to read Cameron’s update to learn of a similar workaround for HyperV.

January 6, 2009 oslo

The First “Oslo” Training Course!

Pluralsight has a two-day course of Oslo” available on 3/30 in Kirkland:

Since the release of .NET 3.0, Microsoft has been actively engaged in an internal initiative to unify their services and modeling technologies. The result is a new modeling platform — codename Oslo”. To summarize, Oslo” makes it possible to move from a world where models describe the application to a world where models are the application. The technology to deliver this new set of capabilities will be delivered through future versions of BizTalk Server, System Center, Visual Studio, .NET Services and the .NET Framework. Come get a first look” at this ambitious effort and see what’s available today!

Enjoy.

January 5, 2009 oslo

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:

There are three approaches to designing programming language syntax. The first is to develop a good understanding of programming language grammars and parsers and then carefully construct a grammar that can be parsed by an LALR(1), or LL(k) parser. The second approach is to `wing it’ and make up some ad-hoc syntax involving curly braces, semicolons, and other random punctuation. The third approach is to `punt’ and use the parser at hand.”

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)
                   (timing-is-right))
      (trade (make-shares 100 x)))

IMO, that’s not a DSL — that’s just a set of function calls in an existing language.

December 30, 2008 oslo

Martin Fowler: DslExceptionalism

I love what Martin has to say on the topic of designing DSLs:

DSLs are seen as a small and simple subset of general purpose programming thinking. As a result people think that what’s true for general purpose languages is also true for DSLs (with the implication that DSLs are too small to be worth thinking much about).

I’m increasingly of the opposite conclusion. The rules for DSLs are different to the rules for general purpose languages - and this applies on multiple dimensions.”

When you’re ready, Oslo lets you build DSLs to be as simple or as complex as you like.

December 30, 2008 oslo

Spirited Discusson of Oslo on stackoverflow.com

Joel 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.
December 30, 2008 oslo

Jon Flanders Builds XLANG in MGrammar

December 30, 2008 oslo

Creating a Logo / Turtle Graphics Textual DSL using Oslo MGrammar

Jason Hogg has posted a very cool Oslo DSL and an interpretter for doing Logo Turtle Graphics. He had this to say about MGrammar:

I did the bulk of the work specifying the grammar for this simple version of Logo on the flight back from LA to Seattle - which should give you a sense of how intuitive Mg is - and how productive the Intellipad authoring experience is.

Thanks, Jason. We try!

December 30, 2008 oslo

Shawn Wildermuth on Oslo

Shawn’s been doing a bunch of Oslo work on his web site:

Enjoy.