dsl

What separates a Ruby DSL from an ordinary API

What are some defining characteristics of a Ruby DSL that separate it from just a regular API? ...

DSLs vs. Plain Old Libraries

I've been thinking lately about the question of DSLs vs. libraries. In my field, the problem with DSLs (R, SAS and Matlab come to mind) is that they're a PITA to write more general purpose code in and a PITA to integrate into more general-purpose code in other languages. I'm not saying either is impossible, just annoying and frustratin...

Making things available only inside Ruby blocks

Is there any way to make methods and functions only available inside blocks? What I'm trying to do: some_block do available_only_in_block is_this_here? okay_cool end But the is_this_here?, okay_cool, etc. only being accessible inside that block, not outside it. Got any ideas? ...

Looking for good server-side language that will allow players to upload code that can be executed

I had an idea of a program I want to write, but which language would be best is my problem. If I have a car racing game and I want to allow users to submit code for new interactive 3D race tracks (think of tracks such as found in the Speed Racer movie), vehicles and for their autonomous vehicles, so, they would create the AI for their c...

Embedded scripting engine for DSL

I'm working on a project which needs an embedded DSL to fullfill its expected requirements. The DSL would be user defined event based. Here goes a mockup of the desired syntax: user-defined-event-1 { // event body } user-defined-event-2 { // event body } Probably, most similar language I know based on events is LSL (from Sec...

Ubiquitous language - term for developers and users

Our project's team members are a big fans of Ubiquitous Language concept from the Domain-Driven Design Community. And here is the problem we've found: Non-techy users like to use a simplified names of all the concepts, they don't want to know all the details, and that's OK. But we can't do the same in code, because this concepts aren't...

DSL Beta 2 - Connector Moniker - Why is it not in the diagram file?

I am creating a DSL, I want to associate two Entities with a connector but I do not want the EntityMoniker to be in the underlying XML, I need it to be in the Diagram File. I am not sure why it is not in the Diagram file automatically as that seems to be the place where all information 'about' the diagram is held. If I remove the elemen...

looking for scientific evidence of the benefits of using a DSL

Greg Wilson's talk "bits of evidence" ( http://www.slideshare.net/gvwilson/bits-of-evidence-2338367 ) discusses the lack of evidence behind the following claims that Martin Fowler has advanced as benefits of using a DSL: "[using a domain-sepcific language] lead to two primary benefits. The first, and simplest is improved programmer prod...

DSL: How do you remove a CompartmentListItem from the context menu

In my DSL I have four DomainClasses that inherit from an abstract base DomainClass. These DomainClasses can all be items in another DomainClass's CompartmentList. My context menu for the CompartmentList is automatically populated with Add MenuItems for each of the 4 domain classes. My problem is that I do not want a context MenuItem for...

Literal structure for time datatype

I'm working on a DSL that should support a time literal and am interested in two different things: What language(s) or DSL(s) support a time literal? How is the literal structured? I'm leaning towards using the following regular expression, extracted from the XSD for XML Schema itself, for identifying a time literal: T\d\d:\d\d:\d\d...

language to create flowcharts

Hi, This seems like something which must have been answered before, but I can't find anything appropriate in the question archives. Basically, I'm looking for a little Domain Specific Language to create flowcharts. I'm terrible at graphic design and making things look nice, and I'd really like a langauge where I could write something in...

Does anyone know of a good reference for DSL design?

I've been looking into designing some Domain Specific Languages which I will probably implement in Clojure, but I really don't have any idea of what's involved. The languages I have in mind are intended to be abstract languages that are readable by domain experts with little or no programming background. Does anyone know of any tutoria...

Stop and continue while evaluation an expression tree

At the office, we've applied simple Domain Specific Languages (DSLs) to several problem domains we encountered. Basically, we parse (lex/yacc) the custom script into an expression tree. Every node in the expression tree has an .evaluate() method that gets called recursively, until the program is done. Nice, and simple as pie. Which is ...

How do I build a domain-specific query language?

I have a biology database that I would like to query. There is also a given terminology bank I have access to that has formalizable predicates. I would like to build a query language for this DB using the predicates mentioned. How would you go about it? My solution is the following: formalize the predicates translate into a query lang...

Domain Language: What is the best way to express?

One of my client sent me a requirement document and while reading that document there was a flash came in my mind. I started rewriting that big document similar like below. Do you think, an automated tool can generate a data model and rules by running through this. Say, if any client communicate their requirement in this approach, it wil...

What features would you like to see in a game programming DSL?

Me and my friend are in the first stages of creating a domain-specific language designed for game programming, for his thesis paper. The language will be fairly low-level, it will have a C-like syntax, optional garbage collection, and will be geared towards systems that have little memory or processing power (ie. Nintendo DS), but shoul...

Compact Class DSL in python

I want to have compact class based python DSLs in the following form: class MyClass(Static): z = 3 def _init_(cls, x=0): cls._x = x def set_x(cls, x): cls._x = x def print_x_plus_z(cls): print cls._x + cls.z @property def x(cls): return cls._x class MyOtherClass(MyClass): z...

Writing my first DSL in C# and getting hung up on func<T> & Action

I'm taking a crack at writing my first DSL for a simple tool at work. I'm using the builder pattern to setup the complex parent object but am running into brick walls for building out the child collections of the parent object. Here's a sample: Use: var myMorningCoffee = Coffee.Make.WithCream().WithOuncesToServe(16); Sample with cl...

DSL Toolkit: How can I get correct elements written in this scenario?

Info: C# , VS2010 Beta 2 , DSL ToolKit Beta 2 I am trying to create the following generated XML in my DSL Diagram when used <Method> ... <FilterDescriptors> <FilterDescriptor Type="Comparison" Name="EmployeeKey" /> </FilterDescriptors> ... </Method> This is how the Method and Filter Descriptor Domain Classes look ...

Language neutral custom tool

I'm working on a DSL tool, and for this tool, there exists a custom code generation tool that creates output files. Currently, this tool is registered with C# using a RegistrationAttribute on the DslPackage with the following code: class FileGenerationRegistrationAttribute : RegistrationAttribute { private const string CSharpGenerat...