π π ππππππ
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π¦π¦π¦π¦π¦π¦π¦π¦π¦π π
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π π π
π π ππππππ
created via Character Canvas DSL
This repo contains materials and examples for the PyconIE 2018 talk: Domain specific languages in Python. The Why and How
You can find the presentation here (pdf version).
Video from the conference was lost to history, but you can listen to pre-conference recording & read it's transcript
- State Machine/Home automation DSL. The example is inspired by the "Gothic security system" from DSL book by Martin Fowler
- State Machine Model
- Various ways of initializing the state machine:
- DSL code:
- Fluid interface definition
- DSL from the introduction - combines a variety of techniques.
- Character Canvas/Drawing Board/Turtle DSL π¦. An example DSL to demonstrate the utility of operators/magic method overloading.
- Fabric-inspired contexts + dynamic field generation
- HTML
- Defining global executing context: runner, dsl-file
- Defining local execution context: Implicit 'self' emulation
- Elixir-style pipes usage example. Demonstrates one of the applications of import time AST manipulation.
-
Domain-Specific Languages by Martin Fowler
-
Macropy A framework to help you with import time AST manipulation.
-
DSLs mentioned in the talk:
-
Various other resources I found useful while doing research for the talk: