Questions tagged [dsl]

Domain-Specific Language is a programming language intended for a particular application domain

A domain-specific language (DSL) is a programming language intended for a particular application domain.

Well-known examples that can be considered DSLs include for markup, for statistics.

There are three key points in above mentioned definition.

  1. Programming Language: DSL is a programming language, which is used by humans to instruct a computer to do something.
  2. Limited Expressiveness: DSL is not a general purpose language like C, Java, etc. It supports minimum features needed to support its domain. Programmer cannot build entire software system using DSL.
  3. Domain focus: DSL focuses on a small domain. The limited focus makes it easy to understand and easy to use.

Martin Fowler divides DSL mainly into two categories :

  1. A External DSL : it is a standalone language with its own custom syntax, but adopting other language such as XML syntax is common. Example of external DSLs are for database queries, languages.
  2. An Internal DSL : They are intrinsically embedded inside a general-purpose language, such as Lava (hardware description language on top of ), (build system on top of ), or (structured markup language on top of ).
2200 questions
15
votes
6 answers

Ruby DSL (Domain Specific Language) repositories, examples

I am seeking excellent examples of Ruby DSLs (Domain Specific Languages). Which repositories, projects do you know of that are worth a read? Why is it (or: are they) great examples? I am particularly interested in more complex examples that are…
Demi
  • 6,147
  • 7
  • 36
  • 38
15
votes
6 answers

Noise-free JSON processing with Scala

I'm coming from a dotnet land, but recently have been looking at the possibilities of alternative programming languages. Nothing really serious, just some bits here and there. Recently I've discovered Scala and I'm pretty fascinated with it. Despite…
Eugene Burmako
  • 13,028
  • 1
  • 46
  • 59
15
votes
3 answers

Is it possible to define own syntax on a GitHub repository?

I'm writing a small DSL, and I'm curious if it's possible to somehow show it in a language bar above the repository source where all languages are listed by percentage of using or GitHub administration needs to allow that language? For example, I'm…
Nikola Stojaković
  • 2,257
  • 4
  • 27
  • 49
15
votes
7 answers

Interesting DSLs, Implemented in Scala?

I've seen BASIC and Apache Camel DSLs in Scala, and they're just fantastic. Any more examples of such DSLs?
George
  • 8,368
  • 12
  • 65
  • 106
15
votes
6 answers

Working out the details of a type indexed free monad

I've been using a free monad to build a DSL. As part of the language, there is an input command, the goal is to reflect what types are expected by the input primitive at the type level for additional safety. For example, I want to be able to write…
15
votes
3 answers

QML Coding Style Checker

I'm looking for a coding style checker for QML code. Something like Checkstyle or Artistic Style. What do people use to define coding style checks for their DSL of choice? Clarification: I'm looking for something that can be used in build automation…
cellcortex
  • 3,166
  • 1
  • 24
  • 34
15
votes
8 answers

Is metaprogramming possible in Javascript?

During my routine work, i happened to write the chained javascript function which is something like LINQ expression to query the JSON result. var Result = from(obj1).as("x").where("x.id=5").groupby("x.status").having(count("x.status") >…
RameshVel
  • 64,778
  • 30
  • 169
  • 213
15
votes
1 answer

How can Haskell quasiquotation be used for replacing tokens on the Haskell level?

Quasiquotation as described in haskellwiki is shown mostly as useful tool for embedding other languages inside Haskell without messing around with string quotation. Question is: For Haskell itself, how easy it would be to put existing Haskell code…
Dan Aloni
  • 3,968
  • 22
  • 30
14
votes
3 answers

method with angle brackets (<>)

Is it possible to have angle brackets in method names , e.g. : class Foo(ind1:Int,ind2:Int){...} var v = new Foo(1,2) v(1) = 3 //updates ind1 v<1> = 4 //updates ind2 The real situation is obviously more complicated than this!!I am trying to provide…
teucer
  • 6,060
  • 2
  • 26
  • 36
14
votes
2 answers

Customize Jenkins pipeline stage view

How can i add the little blue tags to stage view in a Jenkins Pipeline?
Carlos Rodriguez
  • 611
  • 5
  • 11
14
votes
1 answer

Domain Specific Language (DSL) vs. Frameworks

What is the main difference between the main idea of DSL and Frameworks? These two issues are very confusing to me and i couldn't find a proper answer through internet!
Amir Jalilifard
  • 2,027
  • 5
  • 26
  • 38
14
votes
11 answers

Scripting language for trading strategy development

I'm currently working on a component of a trading product that will allow a quant or strategy developer to write their own custom strategies. I obviously can't have them write these strategies in natively compiled languages (or even a language that…
Pierreten
  • 9,917
  • 6
  • 37
  • 45
13
votes
3 answers

Are there any books / papers on DSL Design? (not DSL implementation)

I have to create a DSL for non-programmers (customers of our company) that needs to provide some higher-level language features (loops, conditional expressions, variables ... - so it's not just a "simple" DSL). Working with the DSL should be easy;…
enzi
  • 4,057
  • 3
  • 35
  • 53
13
votes
5 answers

Strategy for parsing natural language descriptions into structured data

I have a set of requirements and I'm looking for the best Java-based strategy / algorthm / software to use. Basically, I want to take a set of recipe ingredients entered by real people in natural english and parse out the meta-data into a…
Jizzoe
  • 131
  • 4
13
votes
6 answers

Can I write a DSL in Perl?

We use Perl for GUI test automation. It has been very successful. We have written a very lightweight DSL kind of language for GUI testing. The DSL is very similar to a object model. For example, we have an Application object at the root. Each…
Krish
  • 1,053
  • 2
  • 17
  • 25