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

Elasticsearch - Merge multiple match phrases

I have the below query, and it's working fine. But my requirement states that I could have multiple phrases which I need to match in the OR condition, Is there any way I can shorten the query. { "query": { "bool": { "should": [ …
0
votes
1 answer

Elastic Search Result in List of POJO

Currently, I am mapping the elastic search hit to a POJO and then reiterating it to save in a list. List contentList = new ArrayList<>(); final BoolQueryBuilder qb = QueryBuilders.boolQuery() …
Ashish Mishra
  • 145
  • 3
  • 13
0
votes
1 answer

Convert two repeated values in array into a string

I have some old documents where a field has an array of two vales repeated, something like this: "task" : [ "first_task", "first_task" ], I'm trying to convert this array into a string because it's the…
Adrian
  • 380
  • 3
  • 13
0
votes
1 answer

Elastic search DSL query to match the log message with starting and ending text

The log messages are like below The application node ABC is down The application node BCD is down The application node XXX is down I have written the following query but it is not working "query": { "must": { "match": { …
Aparna K
  • 1
  • 3
0
votes
1 answer

Is there any DSL (Domain Specific Language) in order to hold contracts?

I'm very used to protobuf, and the .proto files, I think it is such an amazing way of holding contracts between applications. gRPC takes this to another level, but unfortunately, it isn't supported by default on the web, so we need proxies in order…
João
  • 3
  • 1
0
votes
1 answer

Spring Integration storing data

I am trying to store the log information in the database in spring integration. code below.. Main flow: @Bean public IntegrationFlow httpReq() { return IntegrationFlows.from(Http.inboundGateway("/foo") …
Bash
  • 101
  • 11
0
votes
1 answer

How to quickly convert java / json to Xtext langauge?

I am working on an app that processes incoming Json's and I want to easily extract the json data and convert it to a DSL language I'v created using Xtext. My goal is to be able to later convert this data to a String that is based on my. I could…
kotseman
  • 57
  • 6
0
votes
1 answer

How to parameterize jenkins DSL job with pipeline script & docker-compose.yaml

I've created a DSL job nv_dsl.groovy as below, import groovy.text.SimpleTemplateEngine def fileContents = readFileFromWorkspace "nv_pipeline.groovy" def fileContents1 = readFileFromWorkspace "docker-compose.yaml" def engine = new…
Naveen
  • 103
  • 1
  • 12
0
votes
0 answers

Petri net encoding into PDDL

I am a beginner in PDDL. I am trying to write a domain file for Petri net with a fire transaction function. (define (domain newpetri) (:requirements :strips :typing :fluents) (:types place transition) (:predicates …
Ann
  • 11
  • 2
0
votes
1 answer

Shared library for the DSL scripts

How can i use shared library in jenkins for my dsl groovy scripts? Most of my scripts have same steps except few changes in name and url, i do not want to create new script every time. Is there any way one script and do the job?
tarun
  • 17
  • 7
0
votes
1 answer

Spring Integration Unmarshalling

I am trying to unmarshal java objects to xml in Spring integration using UnmarshallingTransformer but I am getting an error that the payload is not created. This is my code : @Bean public Marshaller jaxbMarshaller() { Jaxb2Marshaller…
0
votes
1 answer

Elastic: mismatched input '-'

I'm running this code and I'm getting this error and I just can't figure out what's wrong with it: POST /_sql/translate { "query": "SELECT duracao, elementoRede, hostname, ingest_time FROM reta-* WHERE duracao > 0 ORDER BY duracao DESC LIMIT 10", …
0
votes
1 answer

How to send a referencedParameter to a readFileFromWorkspace through activeChoiceReactiveParam

I'm trying to send a referencedParameter ('product') to a Groovy script (services.groovy) that is triggered by the command readFileFromWorkspace that is wrapped with an activeChoiceReactiveParam. Expected result: Get a dropdown list with the files…
0
votes
1 answer

Elasticsearch Add additional condition if type is different

GET test/_search { "query": { "bool": { "minimum_should_match": 1, "should": [ { "bool": { "must": [ { "term": { "fragmentId": "1" } …
Ashish Mishra
  • 145
  • 3
  • 13
0
votes
1 answer

Elasticsearch scoring Issue for same data

I have an Elastic Index with the below 4 documents. PUT test/_doc/1 { "tag" : "prove" } PUT test/_doc/2 { "tag" : "prove" } PUT test/_doc/3 { "tag" : "freckle" } PUT test/_doc/4 { "tag" : "freckle" } On this i am running a simple query to pick…
Ashish Mishra
  • 145
  • 3
  • 13
1 2 3
99
100