diagrams - a functional edsl for vector...
TRANSCRIPT
![Page 1: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/1.jpg)
DiagramsA Functional EDSL for Vector Graphics
Ryan Yates Brent Yorgey
FARMVancouver, BC, Canada
5 September 2015
![Page 2: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/2.jpg)
What is diagrams?
• Domain-specific language for vector graphics
• Embedded in Haskell
• 7+ years of development
• Large, active, creative community
![Page 3: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/3.jpg)
What is diagrams?
• Domain-specific language for vector graphics
• Embedded in Haskell
• 7+ years of development
• Large, active, creative community
![Page 4: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/4.jpg)
What is diagrams?
• Domain-specific language for vector graphics
• Embedded in Haskell
• 7+ years of development
• Large, active, creative community
![Page 5: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/5.jpg)
What is diagrams?
• Domain-specific language for vector graphics
• Embedded in Haskell
• 7+ years of development
• Large, active, creative community
![Page 6: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/6.jpg)
Why an EDSL?
• Powerful, programmable alternative to Illustrator,Inkscape, PGF/TikZ
• Tools influence the creative process
![Page 7: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/7.jpg)
Why an EDSL?
• Powerful, programmable alternative to Illustrator,Inkscape, PGF/TikZ
• Tools influence the creative process
![Page 8: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/8.jpg)
cabal install diagrams
http://projects.haskell.org/diagrams
(second Google result!)
![Page 9: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/9.jpg)
![Page 10: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/10.jpg)
![Page 11: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/11.jpg)
![Page 12: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/12.jpg)
Demo: visualizing binary trees
![Page 13: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/13.jpg)
Tree visualizations
![Page 14: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/14.jpg)
![Page 15: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/15.jpg)
![Page 16: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/16.jpg)
![Page 17: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/17.jpg)
More examples
![Page 18: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/18.jpg)
3D Trees
seeds/seeds.html
http://www.cs.rochester.edu/u/ryates/art/seeds/
![Page 19: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/19.jpg)
Burrows-Wheeler Transform
![Page 20: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/20.jpg)
Weaving a Torus
http://mathr.co.uk/blog/2013-04-05_weaving_a_
torus.html
![Page 21: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/21.jpg)
Parking in Westminster
https://idontgetoutmuch.wordpress.com/2013/10/23/
parking-in-westminster-an-analysis-in-haskell/
![Page 22: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/22.jpg)
ghc-events-analyze
http://www.well-typed.com/blog/86/
hackage.haskell.org/package/ghc-events-analyze
![Page 23: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/23.jpg)
Cretan maze
http://www.corentindupont.info/blog/posts/
2014-02-17-Cretan-Maze.html
![Page 24: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/24.jpg)
Puzzles
https://maybepuzzles.wordpress.com/2014/04/07/
drawing-puzzles-with-the-haskell-diagrams-framework/
![Page 25: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/25.jpg)
Stencil diagrams
https://readerunner.wordpress.com/2014/04/29/
red-black-neighbourhood-stencil-diagrams/
![Page 26: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/26.jpg)
Num chart
https://martingalemeasure.wordpress.com/2014/07/
07/haskell-numeric-types-quick-reference/
![Page 27: Diagrams - A Functional EDSL for Vector Graphicsozark.hendrix.edu/~yorgey/pub/diagrams-FARM-15.pdf · 2019. 12. 2. · Diagrams A Functional EDSL for Vector Graphics Ryan Yates Brent](https://reader036.vdocument.in/reader036/viewer/2022071604/613f8179f0f55d448e4cd6a4/html5/thumbnails/27.jpg)
Happy diagramming!