Is there any DSL (Domain Specific Language) implemented in Clojure ?
Like any Lisp dialect, Clojure draws a very fuzzy line between API and DSL and therefore the term doesn't hold the same mystique that it does in other languages. Lisp programmers tend to write their programs as layers of DSLs, each layer serving those above it. Having said that, here are a few that you could say display non-trivial levels of DSL-ness (in no particular order):
- Enlive (HTML templating)
- LazyTest (Unit testing)
- fnparse (parser generator)
- Midje (testing & mocking)
- byte-spec (binary-formats)
- Vijual (graph layout)
- Trammel (constraint programming)
- Cascalog (Hadoop w/ datalog syntax)
- Incanter (R-like environment)
- Sandbar (HTML sessions, forms, auth)
- ClojureQL (SQL)
- mini-kanren (embedded logic programming)
- Leiningen (build tool)
- sexpbot (IRC bot with plugin arch)
An useful talk on thinking about how to build DSLs using clojure from the 2010 clojure-conj conference by the creator of Enlive, Christophe Grand: http://blip.tv/clojure/christophe-grand-not-dsl-macros-4540700 (slides are here).
I would also count the design of Ring as in the domain of DSL design. See the talk by Ring's creator, Mark McGranaghan: http://clojure.blip.tv/clojure/mark-mcgranaghan-one-ring-to-bind-them-4724955 (slides)
© 2022 - 2024 — McMap. All rights reserved.