Questions tagged [dsl]

A domain-specific language (DSL) is a programming language or specification language dedicated to a particular problem

Filter by
Sorted by
Tagged with
2 votes
1 answer
184 views

What are the best practices to follow when using global variables when you must use them?

What are the best practices when using global variables? Normally, the common answer to this is to avoid using global variables and use local variables, properties and arguments to pass data around. ...
user avatar
  • 515
0 votes
3 answers
116 views

When using a DSL to structure my application, should I favor coupling the code with the DSL, or trying to have majority of my code independent of it?

We're currently using the Apache Camel Java DSL to structure our application, but I guess this question can mostly apply to any DSL in general. Now, amongst our developers, we are divided on two polar ...
user avatar
0 votes
0 answers
123 views

Domain specific language for regex processing

I am working on a DSL for text processing. The core is searching for regular expressions with some operators around them. These searches are embedded into a more procedural program, which allows for ...
user avatar
  • 237
-3 votes
1 answer
126 views

Is there a standard format for build packaging or do I need to invent my own format?

I have a build pipeline that builds my C++ project on Windows, macOS and Linux. The build process generates 100 libraries and files on each OS. So I have a directory with these files, and I want to ...
user avatar
1 vote
1 answer
334 views

Advice on designing a scraper DSL

I am creating a DSL for a scraping library I am writing. I would like advice on how to design a DSL, and if the designs I have below are good ones. Apologies if this is an open-ended question, but it ...
user avatar
  • 111
0 votes
1 answer
297 views

c# Fluent Builder and invalid object state

I have a question about Fluent Interface Builder. I have a simple object like this: public class Person { public string Name { get; set; } public string Surname { get; set; } public int ...
user avatar
  • 133
-2 votes
2 answers
499 views

What is the best way to run untrusted hooks/plugins?

I'm building a data processing system where users can submit hooks to execute on incoming data. The hooks are untrusted and should execute in a sandbox with access only to a limited API that I expose ...
user avatar
-2 votes
2 answers
309 views

Unambiguously represent separator in a string containing an URI?

I'm trying to develop a way to represent something that has an URI inside of it, let's say: {someVariable}{separator}{URI}{separator}{anotherVariable} where someVariable is alphanumeric. I just ...
user avatar
1 vote
1 answer
137 views

What's the current state with Application-Level Profile Semantics? Anyone use them?

Reading books on REST architecture(especially O'Reilly) many times I came across the idea that one should attach data's description into link http header. Link: <http://example.com/...
user avatar
  • 151
0 votes
3 answers
961 views

Can Aggregate Root Factory create the root, and it's internal classes?

Currently, my aggregates and value objects have protected constructors and some of them are being created by static factory methods inside the aggregate with descriptive names. It creates a nice DSL ...
user avatar
  • 209
4 votes
2 answers
767 views

When is code considered a domain specific language

Today, an interesting discussion with a colleague. We're going to create a wrapper for WCF's channels, that will handle the Close(), Abort() and Dispose() correctly. This wrapper is to be used instead....
user avatar
  • 151
1 vote
0 answers
80 views

Pointers on porting a c++ workflow domain specific language to javascript

I am writing a game in c++ with the v8 javascript engine embedded in it. I have a c++ workflow system I use to tell things how to do specific things. It's nice and I like it, but I need it to work ...
user avatar
  • 248
0 votes
1 answer
149 views

Determine execution order based on declarative definition?

We want to create a DSL in Scala where you can declaratively list the ingredients that a product consist of. These ingredients can consist of for example "Create product a", "Create product b", "Send ...
user avatar
1 vote
1 answer
429 views

Create parts of DSL as Quickfix from xtext grammar

I currently experimenting with DSLs with xtext. I want to implement a quick fix for the dsl I'm writing and I'm wondering, if there is a possibility in xtext or xtend hook (or something else) to ...
user avatar
  • 873
6 votes
2 answers
3k views

Using a rules engine to manage client and server side validation of business rules?

Has anyone managed to use a common rules system between their frontend and backend? Similar to this question: Managing client-side and server-side validations in one place, I'm trying to find a way to ...
user avatar
  • 163
12 votes
2 answers
1k views

Are (basic) SQL queries semantically equivalent to Higher Order Functions?

Is SQL basically a domain specific instance of map + fold + filter? It seems to me that the following SQL: SELECT name FROM fruits WHERE calories < 100 is just syntactic sugar for the following ...
user avatar
5 votes
1 answer
874 views

How to implement efficient heterogeneous microservice data queries?

Our team has an idea of implementing a simple declarative DSL that would let users query the enterprise's domain model via a single interface without caring which specific microservices to call to get ...
user avatar
  • 4,769
0 votes
2 answers
362 views

Definition of the NHibernate Mapping by Code / EF Code First pattern?

Sub-questions: Does this pattern have a formal definition? Who invented it? Is it considered a DSL? The reason why I am asking is because I would like to better assess its applicability to non-...
user avatar
  • 4,769
2 votes
1 answer
466 views

Allow user to enter DSL, rules or code?

I have a python library that allows me to define rules by chaining inputs and outputs of functions ( producer(grep(count( [print(),log() ] ))) This functions define a pipeline from left to right. ...
user avatar
  • 123
0 votes
3 answers
214 views

What is the most robust, extensible way to represent a contract in code? [closed]

I would like to find or create a syntax to express business contracts programmatically, and I am looking for a robust, flexible, future-resistant way to do this. A client should be able to add a ...
user avatar
3 votes
0 answers
549 views

Do thin fluent builder method chains have any need to be "extensible"?

In an environment where refactoring is difficult extensibility can be a life saver. However, this is no excuse to over engineer code. Given that a thin fluent builder method chain is backed by well ...
user avatar
1 vote
0 answers
496 views

How far to go when future proofing fluent-method-chained-DSL test code?

Is it worth implementing interfaces, or using the getThis() trick, or even static factory methods to future proof against the need to extend this DSL? The current design is a pair of thin fluent-...
user avatar
2 votes
1 answer
1k views

Learning to write DSLs utilities for unit tests and am worried about extensablity

I'm trying to simplify our unit tests with hand written DSL's. So far I have DSL's that walk developers through processing a service after setting up all preconditions and the construction of an ...
user avatar
13 votes
5 answers
5k views

When is an API considered to be an embedded DSL?

What is the difference between an API and an embedded Domain Specific Language (DSL)? Is it just syntax? Consider an API like OpenGL. How is that different from a graphics DSL? In other words, if ...
user avatar
5 votes
2 answers
335 views

Need overview of concepts and tools to translate a DSL to regular expressions

I'm looking for a little guidance. Until this morning, this was all over my head. After spending today researching Wikipedia, StackOverflow, etc., I'd say I've got my nose above the water. I'm tasked ...
user avatar
  • 151
101 votes
2 answers
24k views

What is the "Free Monad + Interpreter" pattern?

I've seen people talking about Free Monad with Interpreter, particularly in the context of data-access. What is this pattern? When might I want to use it? How does it work, and how would I implement ...
user avatar
2 votes
2 answers
482 views

How do I simplify a compiler/interpreter?

Recently I wrote an interpreter for operations on sparse matrices (a "sparse matrix calculator") in lex/yacc. The language is still very bare bones and doesn't even include control structures or ...
user avatar
1 vote
1 answer
96 views

Is this mini-DSL for hiding URI passwords compatible with the URI spec?

Passwords exposed in URIs An application stores URIs to be used for file transfers via SFTP, FTP, FTPS and SCP. Many of these URIs contain passwords, for example: sftp://someuser:sekrit@host....
user avatar
  • 1,098
0 votes
1 answer
1k views

Techniques to Enable Dynamic Query / Calculation at Runtime

I'm working on a C# project which provides users an on-demand method of importing data from various formats and then performs mail-merge-like actions to complete a template. The process works for ...
user avatar
2 votes
3 answers
1k views

What is this (anti?)pattern called? (or how to describe it)

The case where a source-level operator actually describes an operation to take place at some future point, thunking the real operator together with its operands. I don't know if this has any kind of ...
user avatar
  • 831
0 votes
1 answer
326 views

Does domain specific languages use other programming languages? [duplicate]

Does a domain specific language use other languages like c++ or java, or is it standalone?
user avatar
3 votes
3 answers
1k views

Domain-specific language for text search/processing?

I work for an organization that does a lot of work with government data. We have a couple of different projects where we've abstracted out common text search/manipulation operations into reusable ...
user avatar
3 votes
2 answers
923 views

Debugging framework for domain specific language

I want to know if there are any tools/tool-kits which aid in building source level debuggers for domain specific languages ? (I work on a proprietary DSL, which doesn't have any tools and sometimes ...
user avatar
  • 141
18 votes
5 answers
8k views

Is there anything in .NET that allows me to define a grammar and generate a programming language?

I have a course in which the proffesor has asked us to create a DSL for a our final project. He presented us in the first courses xText with Eclipse. This being a new course, I am still a bit fuzzy ...
user avatar
4 votes
6 answers
285 views

Why would I write a DSL instead of a form based RIA?

I've been reading some papers recently on domain specific languages (DSL), but none of them appear to address the advantages of a DSL over a rich internet application (RIA). In an RIA, instead of ...
user avatar
4 votes
5 answers
391 views

Trying to wrap my head around class structure for domain-specific language

My work is mostly in embedded systems programming in C, and the proper class structure to pull this off eludes me. Currently we communicate via C# and Visual Basic with a large collection of servos, ...
user avatar
5 votes
2 answers
346 views

Good resources for language design [closed]

There are lots of books about good web design, UI design, etc. With the advent of Xtext, it's very simple to write your own language. What are good books and resources about language design? I'm not ...
user avatar
1 vote
2 answers
442 views

Does syntax matters for a (Lispy) Domain Specific Language (MELT, inside GCC)?

I am the main author and designer of MELT, a domain specific language to extend GCC (the Gnu Compiler Collection). The implementation is available free software (GPLv3 licensed). If you want a ...
user avatar
7 votes
3 answers
639 views

Are custom DSLs still viable?

Are custom DSLs in JavaScript still viable, Specifically ones written with Antler, Boo, or the former Microsoft Oslo? With the proliferation of open source JavaScript/ECMAScript engines (V8, IronJS, ...
user avatar
6 votes
2 answers
611 views

Which books or references cover design of domain specific languages? [closed]

There are a lot of books on domain specific languages (DSLs). Such books talk about compilers, interpreters, parsing, lexing, semantic analysis, and other various bits someone needs to implement a DSL....
user avatar
  • 8,073
24 votes
3 answers
6k views

In what area is LISP's macro better than Ruby's "ability" to create DSL

One of things that makes Ruby shine is the ability to create Domain Specific Languages better, like Sinatra Rspec Rake Ruby on Rails' ActiveRecord Though one can duplicate these libraries in LISP ...
user avatar
5 votes
8 answers
3k views

Can CSS be considered a DSL?

According to Wikipedia, CSS is a style sheet language. However, it's pretty much the only such type of language in use (at least from a web developer's perspective). When trying to categorize CSS as ...
user avatar
18 votes
4 answers
625 views

Database abstraction -- is it being overdone?

After being exposed to numerous database abstraction layers, I'm starting to wonder what the point is of every library inventing their own different paradigm to access data. Picking up a new DAL feels ...
user avatar
3 votes
2 answers
391 views

Is a Model Driven Architecture in Language Oriented Programming (MPS) feasible at this time

As a side project I am developing some sort of DSL where I describe a data model, and generate desired code files from it. I believe this is called Model Driven Architecture. My partial existing ...
user avatar
10 votes
5 answers
4k views

Building a DSL: Scripted atop a general-purpose language or stand-alone?

I'm debating designing a domain specific language to simplify a given, obscure programming model. Part of the debate is whether to build it (as a script) atop an existing language/runtime (e.g. Java) ...
user avatar
  • 3,927
50 votes
28 answers
14k views

When is it reasonable to create my own programming language?

Are there types of killer applications, classes of algorithmic problems, etc., where it is better, in the long run, to create my own language? PS: Just to be sure, I mean a new programming language ...