Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dsl]

Domain-specific languages are computer languages specialized to a particular application domain. Examples are HTML, Unix shell scripts and MediaWiki templates.

0
votes
0answers
11 views

Typeclass-oriented example project with implicit classes

The following code will only be an example of a project that due to (nested) higher kinds heavily relies on typeclasses for it's DSL. When reviewing the code keep in mind that this is an example, so ...
1
vote
0answers
63 views

Extending kotlinx.html dsl to create functions that include bootstrap classes

I'm looking to create a library that extends kotlinx.html and will include functions that have default css classes. The goal is to be able to use a function row{} ...
2
votes
0answers
54 views

Business Rule DSL for Values in Domain-Driven Design

Following the patterns from the book Domain Modeling Made Functional, I am implementing a single-case union for the simple values in my domain model instead of using primitives. The union cases have ...
3
votes
1answer
225 views

AutoMapper DSL (Computation Expression) for F#

I have created a DSL for AutoMapper using an F# Computation Expression Builder. The Computation Builder itself is fairly simple, and effectively defines 5 basic operations: ...
4
votes
1answer
221 views

Elixir PEG Parser Generator

I am trying to learn Elixir, so I decided to write a port of Ruby's Parslet library. I want to define a DSL that lets you define your grammar and given a string can parse it into an AST. I wrote ...
3
votes
1answer
435 views

Small DSL: Converting JSON to MSSQL query

Scenario Once upon a time, there was this human (ahem, me, ahem) who tried (and succeeded) to build a small program which would convert JSON to a MSSQL query using Python 3.x. How does it work? The ...
1
vote
0answers
64 views

Extending a simple Tree parser and lexer

Yesterday, I decided to learn about scala's Parser-Combinator library. After a while, I was able to write a simple Tree parser and lexer which understands trees written like this: ...
5
votes
1answer
980 views

Simple query language for CSV files

I'm struggling to improve this command-line java application, which reads CSV or txt files, ands allows the user do some "queries" with the data. I can't use any external library, so I'm doing it all ...
6
votes
1answer
84 views

Web Development DSL

I'm working on a DSL for web development, similar to sinatra. The git repository is here. I've been attempting to improve this code and write it for 4 months, and as a hobby programmer, I would like ...
4
votes
1answer
4k views

Event-driven finite state machine DSL in Kotlin

I wrote a DSL for defining a finite state machine. My robotics team wants to use a state machine to manage the state of the subsystems on our robot, like the arms, drive train, lifter, etc. Each ...
2
votes
2answers
2k views

Simple ActiveRecord attributes encryption in Rails 5+

The task at hand was to ensure that certain columns in the database are encrypted in case the database data is stolen. I have a feeling that a lot can be improved here (naming, DSL, encapsulations) ...
3
votes
2answers
119 views

F# function to concatenate some DSL scripts with indentation

I'm rather new to F# and functional programming. I wrote the following method to concatenate some custom dsl scripts. The function works are expected without errors. I wanted to know if there was a ...
7
votes
1answer
142 views

Sentence building DSL

Cardshifter is an online trading card game, made by a gang of Code Review community members. Cards can have a bunch of different, and sometimes complex effects, and descriptions for these are ...
3
votes
1answer
67 views

Binary Bayes network classifier in Java - Part I/II - follow-up

TERMINOLOGY We are given a directed acyclic graph (dag) \$G = (V, A)\$, where \$V\$ is the set of nodes and \$A \subseteq V \times V\$ is the set of directed arcs, and a weight function \$p \colon V \...
4
votes
1answer
192 views

DSL design — C DSL

I am trying to design a DSL for writing C. Here is my code as a GitHub gist (Github does not allow me to have slashes in the filenames so I have used underscores instead). It depends on packages free ...
13
votes
3answers
6k views

Hello There Calculator

The open source project I work on uses Antlr4 pretty heavily, but I don't know much about it. I thought I would use April's Community Challenge as an opportunity to learn something about grammars, ...
4
votes
1answer
314 views

Expressing Rebol Dates in EBNF

I'm looking to define the Rebol date format in EBNF notation. I'd like as best as possible to only define valid dates—at least those that are valid in Rebol at the moment: ...
3
votes
0answers
149 views

DSL design for iOS Autolayout

I am building a small DSL for iOS' autolayout feature. Obviously I want to have a typesafe way to define autolayouts instead of doing VSL. I came up with the following: ...
3
votes
1answer
68 views

Simple spec testing DSL

I wrote a very small little DSL for spec testing: ...
4
votes
2answers
75 views

Basic value comparisons

I made a value comparison "programming language" similar to a previous one I made, except this one is based solely on value comparisons. ...
4
votes
1answer
89 views

Learning to write DSL utilities for unit tests and am worried about extensibility

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 ...
3
votes
1answer
112 views

DSL for describing circuits

I am working on a micro project: a Haskell DSL for describing circuits. (You can find the code here) I'm pretty happy with everything so far, but there is an ugly function ...