{"id":15632392,"url":"https://github.com/simongray/clojure-dsl-resources","last_synced_at":"2025-04-22T22:06:55.932Z","repository":{"id":38973859,"uuid":"326501372","full_name":"simongray/clojure-dsl-resources","owner":"simongray","description":"A curated list of Clojure resources for dealing with domain-specific languages.","archived":false,"fork":false,"pushed_at":"2024-07-30T08:48:30.000Z","size":112,"stargazers_count":180,"open_issues_count":0,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T05:47:15.237Z","etag":null,"topics":["data-transformation","domain-specific-language","dsl","nlp","parsing"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simongray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-03T21:10:56.000Z","updated_at":"2025-03-09T06:33:34.000Z","dependencies_parsed_at":"2024-07-30T11:48:06.751Z","dependency_job_id":"766395e3-9e30-481b-b43c-2053277532a0","html_url":"https://github.com/simongray/clojure-dsl-resources","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongray%2Fclojure-dsl-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongray%2Fclojure-dsl-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongray%2Fclojure-dsl-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simongray%2Fclojure-dsl-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simongray","download_url":"https://codeload.github.com/simongray/clojure-dsl-resources/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246230540,"owners_count":20744349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-transformation","domain-specific-language","dsl","nlp","parsing"],"created_at":"2024-10-03T10:43:53.883Z","updated_at":"2025-03-29T19:14:15.757Z","avatar_url":"https://github.com/simongray.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"Clojure DSL resources\n=====================\nThis is a curated list of mostly mature and/or actively developed Clojure resources relevant for dealing with domain-specific languages, in particular parsing and data transformation with/of DSLs. The list is currently being expanded as I explore this area more thoroughly. Suggestions are welcome in the form of pull requests or Github issues. I try to steer around abandonware, though.\n\n\u003e If you're interested in graphs and data modelling, be sure to check out [clojure-graph-resources](https://github.com/simongray/clojure-graph-resources) too.\n\nDomain-specific languages\n-------------------------\n\n### Data-based DSLs\nLisp dialects traditionally make heavy use of macros to rewrite source code at compile time, opening the DSL floodgates. Somewhat unique to Clojure is a strong emphasis on using the core data literals to form DSLs. In either case, a supposed DSL could just as easily be considered a creative use of existing language features or a particularly well-designed API.\n\n#### Web development\n* [weavejester/hiccup](https://github.com/weavejester/hiccup): Hiccup is a library for representing HTML in Clojure.\n  - [lambdaisland/hiccup](https://github.com/lambdaisland/hiccup): Enlive-backed Hiccup implementation; behaves closer to how Hiccup works in Reagent.\n* [noprompt/garden](https://github.com/noprompt/garden): Garden is a library for rendering CSS in Clojure and ClojureScript.\n* [BrianChevalier/radiant](https://github.com/BrianChevalier/radiant): Write full featured CSS as Clojure data structures, inline.\n* [cgrand/enlive](https://github.com/cgrand/enlive): A selector-based (à la CSS) templating and transformation system for Clojure.\n* [stathissideris/dali](https://github.com/stathissideris/dali): Build SVG graphics using a Hiccup-like DSL.\n\n#### Data schemas\n* [plumatic/schema](https://github.com/plumatic/schema): A Clojure(Script) library for declarative data description and validation.\n* [metosin/malli](https://github.com/metosin/malli): Data-driven Schemas for Clojure/Script.\n\n#### Database access\n* [seancorfield/honeysql](https://github.com/seancorfield/honeysql): SQL as Clojure data structures.\n* [yetanalytics/flint](https://github.com/yetanalytics/flint): A Clojure(Script) DSL for creating SPARQL query and update strings.\n* [wotbrew/relic](https://github.com/wotbrew/relic): Functional relational programming for Clojure(Script).\n* [QikLiang/GraphQL-format.clj](https://github.com/QikLiang/GraphQL-format.clj): For building GraphQL queries and transforming the output data in a declaritive format in the style of [Meander](https://github.com/noprompt/meander).\n* [kwrooijen/gungnir](https://github.com/kwrooijen/gungnir): A fully featured, data-driven database library for Clojure.\n\n#### Logic/rules\n* [oakes/odoyle-rules](https://github.com/oakes/odoyle-rules): A rules engine for Clojure and ClojureScript.\n  - [oakes/odoyle-rum](https://github.com/oakes/odoyle-rum): What if we used a rules engine to manage all the state of a frontend UI? Can a rules engine replace reframe?\n* [frankiesardo/minikusari](https://github.com/frankiesardo/minikusari): minikusari is a minimal rule engine built on top of Datascript (and can work with Datomic or Datahike).\n* [mauricioszabo/spock](https://github.com/mauricioszabo/spock): Wrappers of SWI and TuProlog in Clojure.\n* [tatut/clj-prolog](https://github.com/tatut/clj-prolog): Use Prolog from Clojure via Projog.\n* **datalog**: See the relevant section in [simongray/clojure-graph-resources](https://github.com/simongray/clojure-graph-resources#datalog) for a list of libraries.\n\n#### Other data-based DSLs\n* [cljfx/cljfx](https://github.com/cljfx/cljfx): Declarative, functional, extensible wrapper of JavaFX inspired by the better parts of react and re-frame.\n* [thlack/surfs](https://github.com/thlack/surfs): Surfs renders Slack blocks, elements, and composition objects from vectors.\n* [lambdaisland/regal](https://github.com/lambdaisland/regal): Regal lets you manipulate regular expressions as data.\n* [AbhinavOmprakash/luna](https://github.com/AbhinavOmprakash/luna): Wield the power of regex with the readability of English.\n* [riverford/datagrep](https://github.com/riverford/datagrep): grep for data, for quick and dirty filtering at the repl.\n* [green-coder/minimallist](https://github.com/green-coder/minimallist): A minimalist data driven data model library, inspired by Clojure Spec and Malli.\n* [oakes/edna](https://github.com/oakes/edna): A Clojure library for making music with edn data.\n* [yonatane/bytegeist](https://github.com/yonatane/bytegeist): Define binary encoding using plain data.\n* [zen-lang/zen](https://github.com/zen-lang/zen): Zen is a framework to unify Data DSLs, make them composable and take model driven design to the next level.\n* [sbocq/cronit](https://github.com/sbocq/cronit): A Clojure library to iterate over time points defined by a cron like expression.\n\n### Data matching/transformation DSLs\nMost of these could also be considered data-based DSLs, but I think they deserve a category of their own.\n\n* [noprompt/meander](https://github.com/noprompt/meander): A library that empowers you to write transparent data transformation code that allows you to plainly see the input and output of these transformations.\n* [juji-io/editscript](https://github.com/juji-io/editscript): A library designed to diff and patch Clojure data structures.\n* [disalvjn/faconne](https://github.com/disalvjn/faconne): Data Restructuring DSL.\n* [HealthSamurai/ironhide](https://github.com/HealthSamurai/ironhide): A runtime agnostic bidirectional data-driven transformation domain-specific language for fun and profit.\n* [escherize/tracks](https://github.com/escherize/tracks): Allows the user to create transformations declaratively.\n* [clojurewerkz/balagan](https://github.com/clojurewerkz/balagan): A tiny library for data structure transformation inspired by [Enlive](https://github.com/cgrand/enlive).\n* [redplanetlabs/specter](https://github.com/redplanetlabs/specter): Specter rejects Clojure's restrictive approach to immutable data structure manipulation, instead exposing an elegant API to allow any sort of manipulation imaginable.\n* [xapix-io/matchete](https://github.com/xapix-io/matchete): \nYet another pattern matching library for Clojure(Script).\n* [bsless/impedance](https://github.com/bsless/impedance): Fast, declarative Clojure map transforms to solve impedance mismatch.\n* [TristeFigure/derrida](https://github.com/TristeFigure/derrida): Destructuring \"Destructuring\".\n* [esuomi/muotti](https://github.com/esuomi/muotti): A graph-based value transformer library.\n\n### Traditional Lisp DSLs\nMacro-heavy code that transforms your programming language.\n\n* [clojure/core.logic](https://github.com/clojure/core.logic): Offers Prolog-like relational programming, constraint logic programming, and nominal logic programming for Clojure.\n* [quil/quil](https://github.com/quil/quil): Clojure/ClojureScript library for creating interactive drawings and animations.\n* [overtone/overtone](https://github.com/overtone/overtone): Overtone is an Open Source toolkit for designing synthesizers and collaborating with music.\n* [ctford/leipzig](https://github.com/ctford/leipzig): A music composition library for Clojure and Clojurescript.\n  - [ctford/klangmeister](https://github.com/ctford/klangmeister): A musical scratchpad. Klangmeister uses Leipzig for all of its music composition.\n* [cerner/clara-rules](https://github.com/cerner/clara-rules): Clara is a forward-chaining rules engine written in Clojure(Script) with Java interoperability.\n  - [clyfe/clara-eav](https://github.com/clyfe/clara-eav): ClaraEAV is a thin layer over Clara-Rules API that simplifies working with EAV triplets.\n* [lspector/Clojush](https://github.com/lspector/Clojush): The Push programming language and the PushGP genetic programming system implemented in Clojure.\n* [adam-james-v/svg-clj](https://github.com/adam-james-v/svg-clj): DSL for compiling SVG elements with Clojure(script).\n* [google/clojure-turtle](https://github.com/google/clojure-turtle): A Clojure library that implements the Logo programming language in a Clojure context.\n* [farrellm/scad-clj](https://github.com/farrellm/scad-clj): OpenSCAD DSL in Clojure.\n* [athos/JiSE](https://github.com/athos/JiSE): JiSE is a Clojure DSL library that compiles a Java-like language into JVM bytecode at macroexpansion time.\n* [daveyarwood/alda-clj](https://github.com/daveyarwood/alda-clj): A Clojure library for live-coding music with Alda.\n* [latte-central/LaTTe](https://github.com/latte-central/LaTTe): LaTTe is a proof assistant library based on type theory.\n\n### Text-based DSLs\nSome DSLs are based on text, but work on Clojure data.\n\n* [clj-holmes/shape-shifter](https://github.com/clj-holmes/shape-shifter): Transforms a string pattern into clojure spec.\n* [gga/json-path](https://github.com/gga/json-path): An implementation of the JsonPath spec for Clojure.\n\nData-oriented configuration\n---------------------------\nIn most Clojure software there is a guiding principle of _data \u003e functions \u003e macros_. It has resulted in a convention of using mostly data structures to configure the behaviour of systems. This practice has also led to frequent repurposing of data structures. In many cases, the repurposing crosses into a grey zone somewhere between a DSL and idiomatic use.\n\n* [pedestal/pedestal](https://github.com/pedestal/pedestal): Pedestal is a set of libraries written in Clojure that aims to bring both the language and its principles to server-side development.\n* [metosin/reitit](https://github.com/metosin/reitit): A fast, data-driven router for Clojure(Script).\n* [juxt/bidi](https://github.com/juxt/bidi): Bidirectional URI routing.\n* [juxt/yada](https://github.com/juxt/yada): Yada is a web library. Whereas bidi is based on routes as data, yada is based on resources as data.\n\n### Honourable mentions\nThese libraries are not really data-oriented, but can be considered popular mini-DSLs in their own right.\n\n* [weavejester/compojure](https://github.com/weavejester/compojure): Compojure is a small routing library for Ring that allows web applications to be composed of small, independent parts.\n\nParsing\n-------\n* [Engelberg/instaparse](https://github.com/Engelberg/instaparse): Instaparse aims to be the simplest way to build parsers in Clojure.\n* [aphyr/clj-antlr](https://github.com/aphyr/clj-antlr): Clojure bindings for the ANTLR 4 parser library.\n\n### Parser combinators\n* [blancas/kern](https://github.com/blancas/kern): A Parser Combinators Library for Clojure.\n* [youngnh/parsatron](https://github.com/youngnh/parsatron): Born from Haskell's Parsec library, The Parsatron is a functional parser library.\n* [rm-hull/jasentaa](https://github.com/rm-hull/jasentaa): A parser-combinator library for Clojure and ClojureScript.\n\n### Artificial languages\n* [davidsantiago/hickory](https://github.com/davidsantiago/hickory): Hickory parses HTML into Clojure data structures, so you can analyze, transform, and output back to HTML.\n* [green-coder/html-to-hiccup](https://github.com/green-coder/html-to-hiccup): An html-\u003ehiccup conversion function in pure CLJC.\n* [yogthos/markdown-clj](https://github.com/yogthos/markdown-clj): A markdown parser that compiles to both Clojure and ClojureScript.\n* [askonomm/clarktown](https://github.com/askonomm/clarktown): A zero-dependency Markdown parser.\n* [kiranshila/cybermonday](https://github.com/kiranshila/cybermonday): Cybermonday provides a Clojure(Script) interface to working with markdown as a hiccup AST.\n* [bnbeckwith/orgmode](https://github.com/bnbeckwith/orgmode): A Clojure library designed to parse mode files into clojure data structures.\n* [russellwhitaker/uap-clj](https://github.com/russellwhitaker/uap-clj): A Clojure library for extracting browser, operating system, and device information from a raw useragent string.\n* [alumbra/alumbra.parser](https://github.com/alumbra/alumbra.parser): An ANTLR4-based GraphQL parser for Clojure.\n* [igrishaev/remus](https://github.com/igrishaev/remus): An attentive RSS and Atom feed parser for Clojure. It's built on top of well-known and powerful ROME Tools Java library.\n* [zsau/rome-clj](https://github.com/zsau/rome-clj): rome-clj is a Clojure wrapper for ROME, a Java RSS/Atom feed parsing library.\n* [zsau/id3](https://github.com/zsau/id3): A simple ID3v2 parser, written in Clojure.\n* [l3nz/cli-matic](https://github.com/l3nz/cli-matic): Compact, hands-free [sub]command line parsing library for Clojure.\n* [smee/binary](https://github.com/smee/binary): This library is a high performance binary parser combinator.\n* [lambdaforge/datalog-parser](https://github.com/lambdaforge/datalog-parser): This parser is used by Datahike and follows the Datalog dialect of Datomic.\n\n### Natural languages\nNot _technically_ DSLs, but included here to complete the parsing section.\n\n* [simongray/datalinguist](https://github.com/simongray/datalinguist): A Clojure wrapper for Stanford CoreNLP.\n* [plandes/clj-nlp-parse](https://github.com/plandes/clj-nlp-parse): A generalized library to deal with natural language.\n* [turbopape/postagga](https://github.com/turbopape/postagga): A Library to parse natural language in pure Clojure and ClojureScript. \n* [ekoontz/menard](https://github.com/ekoontz/menard): A Clojure library for generation and parsing expressions from grammars and lexicons.\n\n### Clojure code\n* [borkdude/sci](https://github.com/borkdude/sci): Configurable Clojure interpreter suitable for scripting and Clojure DSLs.\n* [erdos/uclj](https://github.com/erdos/uclj): A small, quick-starting, native Clojure interpreter.\n* [clojure/tools.reader](https://github.com/clojure/tools.reader): A complete Clojure reader and an EDN-only reader.\n* [clojure/tools.analyzer](https://github.com/clojure/tools.analyzer): An analyzer for host agnostic Clojure code, written in Clojure and producing AST in EDN.\n* [borkdude/edamame](https://github.com/borkdude/edamame): Configurable EDN/Clojure parser with location metadata.\n* [clj-commons/rewrite-clj](https://github.com/clj-commons/rewrite-clj): rewrite-clj is a library offering mechanisms to easily rewrite Clojure/EDN documents in a whitespace- and comment-preserving way.\n  - [clj-commons/rewrite-cljs](https://github.com/clj-commons/rewrite-cljs): This library is a ClojureScript port of rewrite-clj.\n  - [lread/rewrite-cljc-playground](https://github.com/lread/rewrite-cljc-playground): Working towards rewrite-cljc. Still conservatively pre-alpha, will release on clojars after moving to clj-commons.\n* [oakes/parinferish](https://github.com/oakes/parinferish): A Clojure and ClojureScript library that parses code and optionally applies parinfer(ish) to it.\n  - See [oakes/html-soup](\nhttps://github.com/oakes/html-soup) for an example of a library that uses parinferish as a parser.\n* [carocad/parcera](https://github.com/carocad/parcera): Grammar-based Clojure(script) parser.\n* [echeran/kalai](https://github.com/echeran/kalai): A source-to-source transpiler to convert Clojure to multiple target languages (Rust, C++, Java, ...).\n\nMiscellaneous\n-------------\n* [clojure/spec.alpha](https://github.com/clojure/spec.alpha): The spec library specifies the structure of data, validates or conforms it, and can generate data based on the spec.\n  - [clojure/spec-alpha2](https://github.com/clojure/spec-alpha2):  This library is an evolution from spec.alpha as well as work towards several new features.\n* [jkk/formative](https://github.com/jkk/formative): Web forms for Clojure and ClojureScript - rendering, parsing, and validating.\n* [agentbellnorm/dativity](https://github.com/agentbellnorm/dativity): Dativity is a stateless, data driven workflow engine library for Clojure and ClojureScript.\n* [clojure-lsp/clojure-lsp](https://github.com/clojure-lsp/clojure-lsp): A Language Server for Clojure. Taking a Cursive-like approach of statically analyzing code.\n\nArticles/videos\n---------------\n* [Growing a DSL with Clojure](https://clojure-doc.org/articles/cookbooks/growing_a_dsl_with_clojure/)\n* [Parsing XML in Clojure](https://clojure-doc.org/articles/cookbooks/parsing_xml_with_zippers/)\n* [Clojure Language: Macros](https://clojure-doc.org/articles/language/macros/)\n* [The Art of Tree Shaping with Clojure Zippers](https://lambdaisland.com/blog/2018-11-26-art-tree-shaping-clojure-zip)\n* [Building trees with and without zippers](https://vincent.404.taipei/clojure/building-trees-with-and-without-zippers/)\n* [Writing Parser Combinator Library in Clojure](http://troydm.github.io/blog/2016/04/11/writing-parser-combinator-library-in-clojure/)\n* [Constructing Clojure private DSLs on top of functions and function combinators](https://web.archive.org/web/20221001144803/https://gist.github.com/TristeFigure/20dd01b0d3415f34075cfc02a1918106)\n\nCommunity\n---------\n* [Clojurians Slack](https://clojurians.slack.com/messages): Where Clojure's most active users seem to hang out.\n  - [#parsers](https://clojurians.slack.com/archives/CEJ641W0P)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongray%2Fclojure-dsl-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimongray%2Fclojure-dsl-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimongray%2Fclojure-dsl-resources/lists"}