Presented by Owen Landgren
Transcribed by Mike MacHenry
Define a DSL as a language that simplifies a complex task dependent on outside information
|PIC||difficult (learn all different languages)|
We need a way to computer errors in the code. Communicate failure to the outside world. Robot can't just go nuts when exceptions are raised.
(fail cause . args)
(with-recovery-procedures (f rest . clauses))
We have the idea but we don't know how to put it together
How do you design a DSL? How do you implement a DSL?
Define a core language λ and build layers on top of it. We have layers on top. "Update", above which is "call/cc", above which is "environments" From env's and call/cc we get assignment.
Hudak puts them into a monad to allow the languages to be composed. Now we can add features to get new languages.
p1 over p2
type Animation = Time -> Picture
type Behavior = Time -> a
type Animation = Behavior Picture
Now that it's "lifted" we can scale over behavior
(scaleB v b) p = (scale (v t) (b t)) where v is a
vector, b a behavior, and t a time
A domain-specific language is three things
source -> source transformation
DSL transformations look a lot like compiler designs now. Khypa provides tools for AST definition, pretty printing, transform rules, and transform sequences