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
0
votes
1 answer

skip or check null values in DSL query?

using elasic search query in order to calulate an api, therefore I am using the bucket_script like below: bucket_script: { buckets_path: { succ_req: response_recieve>sum_init total_req:…
kikicoder
  • 383
  • 3
  • 16
0
votes
1 answer

TeamCity Kotlin DSL - Dynamically generate `BuildType`s

I am trying to use the Kotlin DSL for TeamCity to dynamically generate build configurations. In particular, I am looking to create a function to generate BuildTypes from parameters. However, I am having a hard time generating objects that…
Pamplemousse
  • 154
  • 1
  • 13
0
votes
0 answers

Kibana: get records only if condition persist for given span of time

I'm facing a querying problem with Kibana: I want to be returned all the records that match a given condition but only if they match it for at least a given span of time. Something like: Clock > 50 and Vents is "off" ***for 20s minimum*** I tried to…
0
votes
1 answer

Why is Apache Camel Main ignoring the destination bucket name in a YAML DSL AWS2-S3 to AWS2-S3 route?

I am using the Apache Camel Main (see https://camel.apache.org/components/next/others/main.html) component version 3.19 and have the following AWS2-S3 to AWS3-S3 route specified in my route.yaml file: - route: from: uri:…
Ralph
  • 15
  • 3
0
votes
1 answer

How should I name Apache Camel DSL elements? Are they "functions"? "Methods"? "Verbs"?

When I want to refer to the elements used in creating a route in Apache Camel (like from, setBody, to, etc), what name should I use? Just call it a "function"? Can I call "method"? Or does it have a more specific and appropriate name? I've seen…
Ocimar
  • 53
  • 1
  • 6
0
votes
0 answers

Nested elasticsearch aggregation conversion to DSL

This is the aggregation, which has aggs inside aggs. The problem is with DSL conversion of this elasticsearch query. ` "aggs": { "my_bucket": { "date_histogram": { "field": "event_time", "fixed_interval": "1m", …
0
votes
1 answer

How do I enable sandbox "Use Groovy Sandbox" option in the Jenkins DSL file?

I have to manually configure the job and tick the "Use Groovy Sandbox" option in order to start reflecting the values for my Active Choice Parameter and Active Choice Reactive Parameters. I want to avoid this manual step and want to enable it from…
0
votes
1 answer

send undefined in jbuilder [rails]

how i can produce this json with the jbuilder DSL { data: undefined } I think it is necessary to precise without explaining why that { data: null } or { } are not the same json as the first
stani gam
  • 57
  • 5
0
votes
0 answers

QueryDSL using exists and not exists in one predicate

I need to convert a very simple SQL query to queryDSL, but I don't know how to do it. My sql look like this select * from dispute d where exists(select 1 from dispute_clarification_request dcr inner join…
0
votes
1 answer

Elastic search query - all objects of nested array should have specific value

I want to write Elasticsearch query where I am able to look into a nested array, and check a key for all those elements inside the array, if all of them have that value then the root document should be selected. this is a sample data : [ { …
KidWithAComputer
  • 311
  • 1
  • 2
  • 10
0
votes
0 answers

robocorp string escape fail

Robocorp can not convert path-like string properly when it intercept with raw python methods. My code: Get config from files [Arguments] ${path} Directory Should Exist ${path} msg=目录不存在 Directory Should Not Be Empty ${path} …
dogewang
  • 648
  • 1
  • 7
  • 15
0
votes
1 answer

How to model several types with parent-child relationships and chaining methods which all extend the same base class?

I am trying to create and model the types for a series of classes which can be called in a chain in order to execute a method on the deepest class. Each of these classes represents a resource, and should extend a Resource class which has some basic…
paullc
  • 155
  • 2
  • 9
0
votes
0 answers

Recursively expanding macros without raising errors about unbound identifiers

I'm building a custom language using Racket and I would like to expand all macros in a given piece of syntax, while leaving any other forms untouched. Example: #lang racket (define-syntax-rule (identity x) x) (define-syntax-rule (make-pair x y)…
Martin Cejp
  • 607
  • 6
  • 13
0
votes
0 answers

Jenkins Add permissions to folder using groovy

I need to add some permissions (Read, Build, View, cancel etc) to multiple users at the same time. def users = [user1, user2] for(user in users){ String userID = user; jobDsl scriptText: """ folder('example') { …
Parkjin
  • 11
  • 4
0
votes
1 answer

Type checking for closures and map combinations for groovy dsl

i am currently testing somethings from the groovy documentation. I have stumbled across this example for a dsl. show = { println it } square_root = { Math.sqrt(it) } def please(action) { [the: { what -> [of: { n -> action(what(n)) }] …
Hsh727js
  • 11
  • 2