Questions tagged [dsl]
Domain-specific languages are computer languages specialized to a particular application domain. Examples are HTML, Unix shell scripts and MediaWiki templates.
26 questions
0 votes
0 answers
45 views
Spring 7 RouterFunctions and BeanRegistrarDsl med Kotlin
I am looking for a good way to structure my Kotlin code using Spring Boot 4 and Spring 7. The new features I am using are: Reflectionless dependency injection via ...
2 votes
0 answers
83 views
Print columns of text without hard coding the width (attempt 6 - pivot edition)
If you'd like to pivot this: ...
4 votes
0 answers
112 views
Print columns of text without hard coding the width (attempt 5)
If you'd like to print this: ...
4 votes
2 answers
150 views
Extensible typing system for a strongly-typed DSL
I recently finished cleaning up my code in a compiler/interpreter for a strongly-typed domain-specific language, which makes use of three sorts of types: Compile-time enumerated types: Have one of a ...
0 votes
1 answer
501 views
Assert MockMvc response by using Kotlin DSL
I build web application using Kotlin and Spring Boot, I use MockMvc to write integration test. I'm not satisfied how assertion looks like, here is typical assertion: ...
8 votes
2 answers
424 views
Constructing a DSL with properties instead of functions, for use in a type-safe pseudo-builder
As one step in a larger builder setup, I need to build a small collection of objects, each with a small number of required attributes, and each of those with a small set of possible values. The actual ...
1 vote
0 answers
412 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
0 answers
127 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
1 answer
1k 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: ...
5 votes
1 answer
517 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
1 answer
1k 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 ...
5 votes
1 answer
3k 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
1 answer
129 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 ...
10 votes
1 answer
8k 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 ...
3 votes
2 answers
3k 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) ...