Thanks to GraalVM and tools like Babashka and native-image, Clojure is now a viable langauge for writing commandline programs.
One of the needs of almost every commandline program is to handle commandline arguments, which is easy enough for adhoc programs, but doing it comprehensively is not exactly trivial (or at least, tedious).
What might a data-driven library for defining and parsing commandline arguments look like?
You might want to support boolean flags, single value arguments, list arguments, and more? For example: ./program -l -p 8080 -d /usr/logs -g a,b,c,d,e
What would the extracted data look like?
Could this library generate man-docs as well?
...and provide feedback to a user for minor mistakes? (as with spell-spec)
...and do type coercion?
You might want to have your design make use of spec, spec-tools or malli
Proper access-control is central to many web applications. Often, it's sufficient to model which users (or roles) have access to which resources. What might this look like in a declarative data-driven way?
In some applications, the access-control is more nuanced: different users might have different access to certain fields on certain resources (for example, on AirBnB, the location of a rental is approximate, but once you've booked that rental, it's exact). What might a data-driven way of defining per-field ACLs look like? How might it be used to 'filter' data-structures?
End-to-end tests are incredibly valuable at avoiding regressions in web applications, but, they're often tedious to write and maintain.
Existing APIs such as Selenium, Puppeteer, and Capybara are "fluent DSLs", giving you the full power of your programming language. But, since 90% of E2E tests consist of similar actions (visit url, click button 'x', check for value 'y', etc.), perhaps a data-driven syntax could be useful?
Gherkin is a language used for writing BDD test cases. What might it look like as a data-driven Clojure DSL?
Resources
Rake is a language used to describe tasks and dependencies in the context of software build automation. It mixes a declarative DSL (defining tasks and dependencies) with imperative aspects (the task code itself). What might this look like as a data-driven Clojure DSL?
Resources
Several DSLs exist for declarative system configuration (Ansible, Chef, Terraform). Various other components of the DevOps ecosystem also rely on declarative DSLs (ex. Dockerfiles).
Some of these might already be data-driven (Ansible uses YAML), but is this a good idea? Would using EDN be better?
Is there some problem within this space that would be particularly suited for a data-driven approach?
Instaparse is an existing Clojure library for describing context-free grammars, but it uses an EBNF based custom-string syntax. What might it look like if it was data-driven?
AWK is a language for extracting and manipulating data from text files. What might an AWK-like library look like as a data-driven Clojure DSL?
Resources
XSLT is a language for describing transformations of XML documents in XML syntax.
Perhaps, it'd be possible to create a similar language for transforming EDN documents in EDN?
Resources
DOT is a language used for describing graphs (the nodes-and-vertices kind, not the bar-chart kind). Tools like GraphViz consume DOT files and use various algorithms to render the graphs.
What would a data-driven Clojure version of DOT look like?
Resources
ERD diagrams are useful for communicating data schemas. ERDs are essentially graphs, so, a syntax similar to DOT (see above) might be appropriate, but... because ERDs are a more limited domain, it might allow for a simpler syntax.
Chess and Go have notations for describing the moves of a game. What would these look like as EDN? Or, what might these look like for your favorite board game? Or, card games in general? Or, board games in general?
Resources
Modelica is a language used to model complex systems, such as the electrical and mechanical subsystems of a car. Modelica lets you define components (such as a "resistor") with input and output "pins", define equations that related the various inputs and outs (ex. V = IR
), and then hook up and simulate a network of components. It can also be used to model System Dynamics.
Perhaps by choosing a specific subdomain (ex. electrical circuits or system dynamics), you can reduce the scope of your design.
Resources
Discrete event simulation is used to model the flow of work throughout a process, such as in assembly lines, hospitals, supply chains, etc.
The building blocks of these simulations are pretty standard and are likely amenable to a declarative syntax.
Resources
Clojure's existing syntax allows for writing functions to convert inputs -> outputs, but they are not true 'equations'. Clojure's syntax allows for defining specific computations (ex. weight, height => BMI), but aren't transparent enough to derive alternative calculations (ex. BMI, height => weight).
How could we represent mathematical formulae in Clojure to allow for easy human and programmatic generation and manipulation, to perhaps be used...
- within a symbolic manipulation system (as in Maple, Mathematica, or SageMath)
- within a simulation systems (like Modelica)
- to convert to other formats (ex. LaTeX)
Like with math, chemists have their own notations and standards for representing chemical formulas. How might we represent chemical formulas as a Clojure data-driven DSL? (Perhaps, to feed into a system for balancing chemical equations).
Or... instead of formulas, what about representing molecular structures, for the purpose of manipulating and then generating diagrams (ex. skeletal diagrams, Lewis dot diagrams, etc.)? These are graphs, so, perhaps a solution might look similar to the DOT syntax (see above), but because it's a more limited domain, you can make the syntax less general. Chemical Markup Language might be a good place to look for inspiration.
Modern staff notation isn't the only form of music notation; different subsets of music have their own notations, such as percussion notation and tablatures.
Several ways of representing music for programmatic use already exist, but, could Clojure's EDN be of any use?
Uses might include: live coding music, programmatic composition and/or manipulation of songs, etc.
Resources