super 8 languages for making movies
play

Super 8 Languages for Making Movies (A Functional Pearl) Leif - PowerPoint PPT Presentation

Super 8 Languages for Making Movies (A Functional Pearl) Leif Andersen Stephen Chang Ma hias Felleisen PLT @ Northeastern University ICFP - Sept 4, 2017 Super 8 : Languages for Making Movies Super , 8 Languages for Making Movies Super 8 :


  1. Super 8 Languages for Making Movies (A Functional Pearl) Leif Andersen Stephen Chang Ma  hias Felleisen PLT @ Northeastern University ICFP - Sept 4, 2017

  2. Super 8 : Languages for Making Movies Super , 8 Languages for Making Movies

  3. Super 8 : Languages for Making Movies A DSL for Scripting Videos Super , 8 Languages for Making Movies DSL Towers to Solve Multitudes of Problems

  4. Super 8 : Languages for Making Movies A DSL for Scripting Videos Super , 8 Languages for Making Movies DSL Towers to Solve Multitudes of Problems

  5. One down

  6. One down 19 more to go…

  7. We Need Automation

  8. We Need Automation Abstraction

  9.  e Landscape Tool Example Experience Plugin-Ins Blender Script, AE Script UI Automation Apple Script (Macros) Shell Scripts FFmpeg, AVISynth

  10.  e Landscape Tool Example Experience Plugin-Ins Blender Script, AE Script UI Automation Apple Script (Macros) Shell Scripts FFmpeg, AVISynth

  11.  e Landscape Tool Example Experience Plugin-Ins Blender Script, AE Script UI Automation Apple Script (Macros) Shell Scripts FFmpeg, AVISynth

  12.  e Landscape Tool Example Experience Plugin-Ins Blender Script, AE Script UI Automation Apple Script (Macros) Shell Scripts FFmpeg, AVISynth

  13. Video Editor

  14. Functional Programming Language * * But bad with abstractions.

  15. Video, the programming language

  16. Primitives

  17. List Comprehensions

  18. Modules

  19. Functions

  20. (RacketCon 2016) < Writing Video Editing Talks + Editing Talks Manually (RacketCon 2015)

  21. Super 8 : Languages for Making Movies A DSL for Scripting Videos Super , 8 Languages for Making Movies DSL Towers to Solve Multitudes of Problems

  22. Super 8 : Languages for Making Movies A DSL for Scripting Videos Super , 8 Languages for Making Movies DSL Towers to Solve Multitudes of Problems

  23. Video, the tower of languages

  24. Video MLT FFmpeg

  25. Video MLT FFmpeg

  26. We have a problem…

  27. We have a problem… We want to solve it in the problem domain's own language…

  28. We have a problem… We want to solve it in the problem domain's own language… DSLs are the "Ultimate Abstraction" Paul Hudak

  29. V We have a problem…

  30. V We have a problem… We want to solve it in the problem domain's own language…

  31. V We have a problem… We want to solve it in the problem domain's own language… Tower of DSLs

  32. Tower of DSLs Language Oriented Programming

  33. We want to make DSLs quickly… Use Racket, a programmable programming language MLT FFmpeg

  34. We make DSLs using Linguistic Inheritance

  35. Movie Script We make DSLs using Linguistic Inheritance Video Implementation Racket

  36. Movie Script We make DSLs using Linguistic Inheritance Re-export construct Video Implementation Racket

  37. Movie Script We make DSLs using Linguistic Inheritance Re-export construct Video Implementation Remove construct Racket

  38. Movie Script We make DSLs using Linguistic Inheritance Re-export construct New construct Video Implementation Remove construct Racket

  39. Movie Script We make DSLs using Linguistic Inheritance Re-export construct New construct Video Implementation Remove construct Change construct Racket

  40. Change construct

  41. Interposition Points #lang video (module anon video ( #%module-begin logo logo parses talk talk (define logo ...) ;; Where (define talk ...))) (define logo ...) (define talk ...)

  42. Interposition Points (module anon video (module anon racket ( #%module-begin ( #%module-begin logo (require vidlib) elaborates talk (define logo (define logo ...) ...) (define talk (define talk ...) ...))) (vid-begin vid logo talk)))

  43. Implementing Interposition Points #lang racket

  44. FFI

  45. An FFI DSL mlt_repository mlt_factory_init(const char *directory); (Scheme Wrksp., 2004)

  46. An FFI DSL mlt_repository mlt_factory_init(const char *directory); (define-mlt mlt-factory-init (_fun [p : _path] -> [ret : _mlt-repository/null] -> (maybe-error? ret))) (Scheme Wrksp., 2004)

  47. An Object DSL (define-mlt mlt-factory-init ...) (define-mlt mlt-factory-close ...) (define-constructor clip video ... mlt-factory-init ... mlt-factory-close ...)

  48. MLT FFmpeg

  49. Documentation

  50. A Documentation DSL (ICFP, 2009)

  51. A Documentation DSL #lang video/documentation @title{Video: The Language} @(defmodulelang video) Video Language (or VidLang, sometimes referred to as just Video) is a DSL for editing...videos. It aims to merge the capabilities of a traditional (ICFP, 2009)

  52. MLT FFmpeg

  53. Types

  54. (clip "clip.mp4" #:start 0 #:end 50)

  55. (cut-producer (clip "clip.mp4" #:start 0 #:end 50) #:start 0 #:end 100)

  56. (cut-producer (clip "clip.mp4" #:start 0 #:end 50) #:start 0 #:end 100)

  57. A Typed DSL

  58. A Typed DSL (POPL, 2016)

  59. A Type Implementation DSL (define-typed-syntax (clip f) ≫ [ ⊢ f ≫ _ ⇐ File] #:where n (length f) ------------------------------------- [ ⊢ (untyped:clip f) ⇒ (Producer n)]) (POPL, 2016)

  60. MLT FFmpeg

  61. DSL V We have a problem…

  62. DSL V We have a problem… We want to solve it in the problem domain's own language…

  63. DSL V We have a problem… We want to solve it in the problem domain's own language… syntax-parse A DSL for making DSLs (ICFP, 2010)

  64. MLT FFmpeg

  65. Editor V We have a problem…

  66. Editor V We have a problem… We want to solve it in the problem domain's own language…

  67. Editor V We have a problem… We want to solve it in the problem domain's own language… ? Linguistic Inheritance ? We make DSLs using

  68. Future Work

  69. MLT FFmpeg

  70.  anks For Watching http://lang.video We make DSLs using @videolang Linguistic Inheritance MLT FFmpeg

Recommend


More recommend