1 / 10

600.429 FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES

600.429 FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES. Dr. John Peterson Western State Colorado University. SPJ!. What did you think of SPJ’s talk? Why was this talk good? What did you like about his presentation style?. Homework. Project 7 is due tomorrow

jock
Download Presentation

600.429 FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 600.429FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University

  2. SPJ! What did you think of SPJ’s talk? Why was this talk good? What did you like about his presentation style?

  3. Homework • Project 7 is due tomorrow • Project 8 will be up tonight – we’ll talk about it later today. • Questions on #7? • Project 9 will be the last one.

  4. Project Deadlines Schedule: • Before Wednesday: each project needs a “home page” in the wiki, a name, and an overview. Place code in a public repository and link to your home page. • Wednesday – work day and meetings. Come ready to hack on your code • Monday, Nov 12: Presentation #1: each team gives a 7 minute presentation.

  5. Homework #8 • Finish up FRP Engine • Demo engine using a simple game. I’ll place a link to the Paddleball game used in Paul’s book in the wiki. • Modify the engine to gather statistics for the number of computation steps at each time and shout at signal initialization • Add a “let” construct to create shared signals

  6. New Representations What would you have to do to allow shouting? Implement let? Gather statistics? data Behavior a = Behavior (Stimulus -> (Behavior a, a)) data Event a =Event (Stimulus -> (Event a, Maybe a))

  7. Dark Corners of FRP: Sharing How will this work? x = integral 1 Animate $ (el (p2 0 0) (p2 x x))

  8. Sharing How can we avoid recomputation? • Create an object to explicitly represent sharing (a “let”) • Implicitly look for sharing at key points in the program

  9. Memoization Big idea: Turn (a -> b) into a memoized (a -> b) We can either: • Remember all values and replay answers • Remember the most recent value and replay that answer (why is this the right thing?)

  10. The Let construct Haskell uses “let” to make sure evaluation happens at most once. We can add this to a DSL: x = myLet computation Use this to create a sharable value. Problem: how to give this an observable name

More Related