function + action = interaction (2015)
TRANSCRIPT
![Page 1: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/1.jpg)
www.pineapple.cc
![Page 2: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/2.jpg)
www.pineapple.cc
Function + Action = InteractionIchiroh Kanaya*, Mayuko Kanazawa**, Masataka Imura***
*Graduate School of Engineering, Osaka University **Department of Image Arts, Kobe Design University
***School of Science and Technology, Kwansei Gakuin University
![Page 3: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/3.jpg)
www.pineapple.cc
![Page 4: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/4.jpg)
![Page 5: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/5.jpg)
www.pineapple.ccArtist/Producer/Director
Scientist/Engineer/Hacker
Scientist/Engineer/Designer
![Page 6: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/6.jpg)
Artist’s Wants
Poor Engineer
![Page 7: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/7.jpg)
www.pineapple.cc
![Page 8: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/8.jpg)
www.pineapple.cc
Shooting A Moving TargetShiro Kawai, Square USA
Proc. Japan Lisp User Group Meeting, 2000.
![Page 9: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/9.jpg)
www.pineapple.cc
–Shiro Kawai
The balance of integrity and flexibility is subtle but important. In our size of production, sometimes you need to allow one part of the production to work inconsistently with another, during a transition (and if things keep changing, it is always a transition period!) If you emphasize integrity and consistency too much, things cannot change in a timely manner. If you emphasize flexibility too much and allow people work their own way, you lose integrity. In my opinion, Lisp itself keeps a good balance between these, and fits well into this type of project.
![Page 10: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/10.jpg)
www.pineapple.cc
Programmer 1 Programmer 2 Programmer 3
Code 1Perl
Code 2Java
Code 3Visual Basic
Domain Specific LanguagePhantom Query Language
Foundation Common LISP
Architect
Not en
ough?
![Page 11: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/11.jpg)
www.pineapple.cc
Kajiya’s Rendering Equation
Radiance
![Page 12: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/12.jpg)
www.pineapple.cc
Coherency of Dimensions (Types in Programming)
Referential Transparency
Linearity/Symmetry
![Page 13: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/13.jpg)
www.pineapple.cc
p(t)
ClocktowerDisplay Python/OpenGL
Sensor C++/OpenCV
Server Scheme
{x(t), p(t)}
t
u(p)x(t)+y(u) t
t
Assets JPEG
y(u)u
t
{x(t), p(t)}
u(p)
x: live video y: animation p: status t: current time u: animation time HTTP
R.T.
R.T. R.T.
![Page 14: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/14.jpg)
www.pineapple.cc
Monad
![Page 15: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/15.jpg)
www.pineapple.cc
==> 22
![Page 16: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/16.jpg)
www.pineapple.cc
==> (+3)25
{$0+3}(2)// 5
![Page 17: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/17.jpg)
www.pineapple.cc
==> Just 2Just 2
![Page 18: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/18.jpg)
www.pineapple.cc
data Maybe a = Nothing | Just a
enum Optional<T> { case None case Some(T)}
![Page 19: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/19.jpg)
www.pineapple.cc
==> (+3)(Just 2)ERR
![Page 20: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/20.jpg)
www.pineapple.cc
==> fmap (+3) (Just 2)Just 5
Optional.Some(2).map{$0+3}// .Some(5)
![Page 21: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/21.jpg)
www.pineapple.cc
![Page 22: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/22.jpg)
www.pineapple.cc
Optional.None.map{$0+3}// .None
==> fmap (+3) NothingNothing
![Page 23: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/23.jpg)
www.pineapple.cc
![Page 24: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/24.jpg)
www.pineapple.cc
{$0-1}(3)// 2
==> (-1)32
![Page 25: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/25.jpg)
www.pineapple.cc
==> let f=fmap (+3) (+2)==> f 1015
let f=map({$0+2}, {$0+3})f(10)// 15
![Page 26: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/26.jpg)
www.pineapple.cc
![Page 27: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/27.jpg)
www.pineapple.cc
![Page 28: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/28.jpg)
www.pineapple.cc
half x | even x = Just (x `div` 2) | otherwise = Nothing
func half(a: Int) -> Int? { return a%2==0 ? a/2 : .None}
![Page 29: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/29.jpg)
www.pineapple.cc
![Page 30: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/30.jpg)
www.pineapple.cc
Optional.some(3).flatMap(half)// .NoneOptional.some(4).flatMap(half)// 2
==> Just 3 >>= halfNothing==> Just 4 >>= half2
![Page 31: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/31.jpg)
www.pineapple.cc
![Page 32: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/32.jpg)
www.pineapple.cc
![Page 33: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/33.jpg)
www.pineapple.cc
![Page 34: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/34.jpg)
www.pineapple.cc
![Page 35: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/35.jpg)
www.pineapple.cc
![Page 36: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/36.jpg)
www.pineapple.cc
![Page 37: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/37.jpg)
www.pineapple.cc
http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
![Page 38: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/38.jpg)
www.pineapple.cc
p(t)
ClocktowerDisplay Python/OpenGL
Sensor C++/OpenCV
Server Scheme
{x(t), p(t)}
t
u(p)x(t)+y(u) t
t
Assets JPEG
y(u)u
t
{x(t), p(t)}
u(p)
x: live video y: animation p: status t: current time u: animation time HTTP
R.T.
R.T. R.T.
Almost
R.T.
![Page 39: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/39.jpg)
www.pineapple.cc
Y=FX
![Page 40: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/40.jpg)
www.pineapple.cc
[Y]=F[X]
![Page 41: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/41.jpg)
www.pineapple.cc
[Y, T]=F[X, S]
![Page 42: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/42.jpg)
www.pineapple.cc
[Y, T]=F[X, S]; [Z, U]=G[Y, T]
[Z, U]=G•F[X, S]
![Page 43: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/43.jpg)
www.pineapple.cc
Coherency of Dimensions (Types in Programming)
Automatic Deduction of Data Type (like C++14, Haskell)
Referential Transparency
Action in Function (like Haskell)
Linearity/Symmetry
…Future Work
![Page 44: Function + Action = Interaction (2015)](https://reader033.vdocuments.mx/reader033/viewer/2022052913/55d0d113bb61ebf7698b46e5/html5/thumbnails/44.jpg)
www.pineapple.cc
Questions?@kanaya