One possible starting point may be here: [link:blogs.msdn.com]

Kind regards

don

By on 5/26/2009 10:07 AM ()

Hi,
I have another example of developing a DSL in my functional-programming book. I'm mentioning this because the source code is available for free here: [link:www.functional-programming.net]

In chapter 15, there are two examples. The first one shows how to create a DSL for writing animations, so you can for example write something like this to create a solar system simulation:

1
2
3
4
5
6
7
8
9
10
11
let sun   = circle (forever Brushes.Goldenrod) 100.0f.forever
let earth = circle (forever Brushes.SteelBlue) 50.0f.forever
let mars  = circle (forever Brushes.Chocolate) 40.0f.forever
let moon  = circle (forever Brushes.DimGray)   20.0f.forever

let planets = 
   sun -- rotate 120.0f 1.3f 
            (earth -- rotate 50.0f 12.0f moon)
       -- rotate 160.0f 0.7f mars
  
af.Animation <- faster 0.2f planets

Another example, which is a lot simpler demonstrates how to model financial contracts. I just checked the source code and it seems to work fine with May 2009 CTP. I don't yet have project files for Visual Studio 2010, but I'm planing to add them soon.

By on 5/26/2009 11:59 AM ()

Hello,

Thanks a lot for the suggestions. It was very helpfull and I almost managed to understand everything, but I think I missed something.

For example, if I try to extend the Animations DSL, by making a circle changining its size, works great and easy. But, is seems I cannot make it change its color in time.

Could you give an idea?

Thanks.

By on 6/6/2009 7:01 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper