All Projects → simongray → clojure-dsl-resources

simongray / clojure-dsl-resources

Licence: MIT License
A curated list of Clojure resources for dealing with domain-specific languages.

Projects that are alternatives of or similar to clojure-dsl-resources

wrangler
Wrangler Transform: A DMD system for transforming Big Data
Stars: ✭ 63 (-36.36%)
Mutual labels:  parsing, data-transformation
hxjsonast
Parse JSON into position-aware AST with Haxe!
Stars: ✭ 28 (-71.72%)
Mutual labels:  parsing
ruby-marshal
Haskell library to parse a subset of Ruby objects serialised with Marshal.dump
Stars: ✭ 30 (-69.7%)
Mutual labels:  parsing
Miksilo
The fastest way to build a language
Stars: ✭ 27 (-72.73%)
Mutual labels:  parsing
structures
Declarative binary data builder and parser: simple, fast, extensible
Stars: ✭ 29 (-70.71%)
Mutual labels:  parsing
MimeParser
Mime parsing in Swift | Relevant RFCs: RFC 822, RFC 2045, RFC 2046
Stars: ✭ 18 (-81.82%)
Mutual labels:  parsing
CYK-Parser
A CYK parser written in Python 3.
Stars: ✭ 24 (-75.76%)
Mutual labels:  parsing
m3u8
Parse and generate m3u8 playlists for Apple HTTP Live Streaming (HLS) in Ruby.
Stars: ✭ 96 (-3.03%)
Mutual labels:  parsing
desktop
Extendable calculator for the 21st Century ⚡
Stars: ✭ 85 (-14.14%)
Mutual labels:  parsing
dataconf
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.
Stars: ✭ 40 (-59.6%)
Mutual labels:  parsing
humanparser
Parse a human name string into salutation, first name, middle name, last name, suffix.
Stars: ✭ 78 (-21.21%)
Mutual labels:  parsing
LR
explore different techniques to generate LR(k) parsing code
Stars: ✭ 13 (-86.87%)
Mutual labels:  parsing
libcitygml
C++ Library for CityGML Parsing and Visualization
Stars: ✭ 69 (-30.3%)
Mutual labels:  parsing
YaccConstructor
Platform for parser generators and other grammarware research and development. GLL, RNGLR, graph parsing algorithms, and many others are included.
Stars: ✭ 36 (-63.64%)
Mutual labels:  parsing
GitHub-WebHook
🐱 Validates and processes GitHub's webhooks
Stars: ✭ 25 (-74.75%)
Mutual labels:  parsing
Jsonify
♨️A delightful JSON parsing framework.
Stars: ✭ 42 (-57.58%)
Mutual labels:  parsing
pdfmajor
A better PDF Extraction Tool using the latest and fastest python features
Stars: ✭ 19 (-80.81%)
Mutual labels:  parsing
json2object
Type safe Haxe/JSON (de)serializer
Stars: ✭ 54 (-45.45%)
Mutual labels:  parsing
python-yamlable
A thin wrapper of PyYaml to convert Python objects to YAML and back
Stars: ✭ 28 (-71.72%)
Mutual labels:  parsing
xcfg
X (weighted / probabilistic) Context-Free Grammars
Stars: ✭ 17 (-82.83%)
Mutual labels:  parsing

Clojure DSL resources

This 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.

If you're interested in graphs and data modelling, be sure to check out clojure-graph-resources too.

Domain-specific languages

Lisp 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.

Data-based DSLs

Data matching/transformation DSLs

Most of these could also be considered data-based DSLs, but I think they deserve a category of their own.

  • 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.
  • juji-io/editscript: A library designed to diff and patch Clojure data structures.
  • disalvjn/faconne: Data Restructuring DSL.
  • HealthSamurai/ironhide: A runtime agnostic bidirectional data-driven transformation domain-specific language for fun and profit.
  • 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.
  • xapix-io/matchete: Yet another pattern matching library for Clojure(Script).
  • bsless/impedance: Fast, declarative Clojure map transforms to solve impedance mismatch.
  • TristeFigure/derrida: Destructuring "Destructuring".

Traditional Lisp DSLs

  • clojure/core.logic: Offers Prolog-like relational programming, constraint logic programming, and nominal logic programming for Clojure.
  • quil/quil: Clojure/ClojureScript library for creating interactive drawings and animations.
  • overtone/overtone: Overtone is an Open Source toolkit for designing synthesizers and collaborating with music.
  • ctford/leipzig: A music composition library for Clojure and Clojurescript.
    • ctford/klangmeister: A musical scratchpad. Klangmeister uses Leipzig for all of its music composition.
  • cerner/clara-rules: Clara is a forward-chaining rules engine written in Clojure(Script) with Java interoperability.
    • clyfe/clara-eav: ClaraEAV is a thin layer over Clara-Rules API that simplifies working with EAV triplets.
  • lspector/Clojush: The Push programming language and the PushGP genetic programming system implemented in Clojure.
  • adam-james-v/svg-clj: DSL for compiling SVG elements with Clojure(script).
  • google/clojure-turtle: A Clojure library that implements the Logo programming language in a Clojure context.
  • farrellm/scad-clj: OpenSCAD DSL in Clojure.
  • athos/JiSE: JiSE is a Clojure DSL library that compiles a Java-like language into JVM bytecode at macroexpansion time.
  • daveyarwood/alda-clj: A Clojure library for live-coding music with Alda.

Text-based DSLs

Some DSLs are implemented in Clojure, but compiled or interpreted from text.

  • borkdude/sci: Configurable Clojure interpreter suitable for scripting and Clojure DSLs.

Data-oriented configuration

In most Clojure software there is a guiding principle of data > functions > 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.

  • 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.
  • metosin/reitit: A fast, data-driven router for Clojure(Script).
  • juxt/bidi: Bidirectional URI routing.
  • juxt/yada: Yada is a web library. Whereas bidi is based on routes as data, yada is based on resources as data.

Honourable mentions

These libraries are not really data-oriented, but can be considered popular mini-DSLs in their own right.

  • weavejester/compojure: Compojure is a small routing library for Ring that allows web applications to be composed of small, independent parts.

Parsing

Parser combinators

  • blancas/kern: A Parser Combinators Library for Clojure.
  • youngnh/parsatron: Born from Haskell's Parsec library, The Parsatron is a functional parser library.
  • rm-hull/jasentaa: A parser-combinator library for Clojure and ClojureScript.

Artificial languages

  • davidsantiago/hickory: Hickory parses HTML into Clojure data structures, so you can analyze, transform, and output back to HTML.
  • yogthos/markdown-clj: A markdown parser that compiles to both Clojure and ClojureScript.
  • kiranshila/cybermonday: Cybermonday provides a Clojure(Script) interface to working with markdown as a hiccup AST.
  • bnbeckwith/orgmode: A Clojure library designed to parse mode files into clojure data structures.
  • russellwhitaker/uap-clj: A Clojure library for extracting browser, operating system, and device information from a raw useragent string.
  • alumbra/alumbra.parser: An ANTLR4-based GraphQL parser for Clojure.
  • 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.
  • zsau/rome-clj: rome-clj is a Clojure wrapper for ROME, a Java RSS/Atom feed parsing library.
  • zsau/id3: A simple ID3v2 parser, written in Clojure.
  • l3nz/cli-matic: Compact, hands-free [sub]command line parsing library for Clojure.
  • smee/binary: This library is a high performance binary parser combinator.

Natural languages

Not technically DSLs, but included here to complete the parsing section.

Clojure code

  • clojure/tools.reader: A complete Clojure reader and an EDN-only reader.
  • clojure/tools.analyzer: An analyzer for host agnostic Clojure code, written in Clojure and producing AST in EDN.
  • borkdude/edamame: Configurable EDN/Clojure parser with location metadata.
  • clj-commons/rewrite-clj: rewrite-clj is a library offering mechanisms to easily rewrite Clojure/EDN documents in a whitespace- and comment-preserving way.
  • oakes/parinferish: A Clojure and ClojureScript library that parses code and optionally applies parinfer(ish) to it.
    • See oakes/html-soup for an example of a library that uses parinferish as a parser.
  • carocad/parcera: Grammar-based Clojure(script) parser.
  • echeran/kalai: A source-to-source transpiler to convert Clojure to multiple target languages (Rust, C++, Java, ...).

Miscellaneous

  • clojure/spec.alpha: The spec library specifies the structure of data, validates or conforms it, and can generate data based on the spec.
    • clojure/spec-alpha2: This library is an evolution from spec.alpha as well as work towards several new features.
  • jkk/formative: Web forms for Clojure and ClojureScript - rendering, parsing, and validating.
  • agentbellnorm/dativity: Dativity is a stateless, data driven workflow engine library for Clojure and ClojureScript.
  • clojure-lsp/clojure-lsp: A Language Server for Clojure. Taking a Cursive-like approach of statically analyzing code.

Work-in-progress

Some projects are both actively developed and interesting enough to include on this list, but aren't quite ready yet.

Articles/videos

Community

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].