Getting into Domain Specific Languages

If I ever figure out how to conceptually frame this whole social contract direction, a working prototype will probably consist of some work creating a domain specific language (DSL). Kelly actually introduced me to the concept a while back when we started working with Rails, and then I’ve also seen some similar ideas in my scheme, er, symbolic programming class with Sussman. Ruby has been praised for how easily it accomodates creation and interaction of these domain specific languages, Rails being one of the leading examples.

Some resources that will hopefully act as hooks for me to learn more:

Writing Domain Specific Languages
Nice Ruby-oriented introduction.
More Ruby: method_missing
Related ways of overloading existing ruby methods to make them do special things.
Creating DSLs with Ruby
Another Ruby-based introduction from Artima.
First 6.891 PSet and solutions
Good scheme coding seems to essentially boil down to elegant domain specific language design.

I’m also looking at this stuff with an eye for the command line based physicalized information interaction system I’ve been slowly pushing forward. I’d like to expose a simple world model that makes it easy to map record fields to physical attributes of objects (ie price -> mass, name -> color, etc). I’m working in Python for this one, and I’m concerned that its rigidity (relative to Ruby) may be a hinderance.

Leave a Reply