Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Immutability, 
or Putting the Dream Machine to Work
Watch the video with slide 
synchronization on InfoQ.com! 
http://www.infoq.com/presentations 
/om-clojurescript 
InfoQ.co...
Presented at QCon New York 
www.qconnewyork.com 
Purpose of QCon 
- to empower software development by facilitating the sp...
The trie memory scheme is inefficient for small memories, but it 
be- comes increasingly efficient in using available stor...
Model-View-Controller
๏ first formulated by Trygve Reenskaug 
Adele Goldberg and others at Xerox 
PARC in 1979 
๏ long shadow, the basic concept...
๏ At a very abstract level MVC is a sound 
separation of concerns 
๏ Implementations leave much to be 
desired 
๏ Stateful...
Functional Programming and Data 
• immutable values, not mutable objects 
• “change” returns a new value, leaving the old ...
Simple example: Linked List 
X
Simple example: Linked List 
Y X
Simple example: Linked List 
X 
Z 
Y
Simple example: Linked List 
X 
Z 
Y 
structural sharing
Sharing structure 
• space efficiency 
• computational efficiency – avoids copying
Phil Bagwell 
• Array Mapped Trie 
• Hash Array Mapped Trie
Bitmapped Vector Trie 
• data lives in the leaves 
• e.g. prefix tree used for string lookup 
• bitwise trie
Persistent Vector
Persistent Vector
Persistent Vector
Persistent Vector
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Persistent Vector 
getindex
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 
0b01101010
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 
0b01101010
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 
0b01101010
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 
0b01101010
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 
0b01101010
Persistent Vector 
assoc
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
Persistent Vector 
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 
104 105 foo 107
Persistent Vector 
Length 4 internal vectors?
Persistent Vector 
32 
From Bagwell, Rompf 2011
327
34,359,738,368 
elements
demo
Om
f(D0) = V0
f(D1) = V1
diff(V0,V1) = CHANGES
demo
Persistent Data Structures … ROCK
Questions?
Watch the video with slide synchronization on 
InfoQ.com! 
http://www.infoq.com/presentations/om-clojurescript
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
UI: The Functional Final Frontier
Prochain SlideShare
Chargement dans…5
×

UI: The Functional Final Frontier

717 vues

Publié le

Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/11Ojtbq.

David Nolen introduces Om, a ClojureScript library providing a functional layer on top of Facebook React for building MVC UIs. Filmed at qconnewyork.com.

David Nolen is a JavaScript developer for Cognitect. He also runs a Brooklyn based workshop called Kitchen Table Coders. In his free time he does fun stuff with Clojure and ClojureScript.

Publié dans : Technologie
  • Soyez le premier à commenter

UI: The Functional Final Frontier

  1. 1. Immutability, or Putting the Dream Machine to Work
  2. 2. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /om-clojurescript InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month
  3. 3. Presented at QCon New York www.qconnewyork.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  4. 4. The trie memory scheme is inefficient for small memories, but it be- comes increasingly efficient in using available storage space as memory size increases. The attractive features of the scheme are these: 1) The retrieval process is extremely simple. Given the argument, enter the standard ini- tial register with the first character, and pick up the address of the second. Then go to the second register, and pick up the address of the third, etc. 2) If two arguments have initial characters in common, they use the same storage space for those characters. -J.C.R. Licklider, "Man-Computer Symbiosis" 1960
  5. 5. Model-View-Controller
  6. 6. ๏ first formulated by Trygve Reenskaug Adele Goldberg and others at Xerox PARC in 1979 ๏ long shadow, the basic concepts still prevalent today.
  7. 7. ๏ At a very abstract level MVC is a sound separation of concerns ๏ Implementations leave much to be desired ๏ Stateful objects everywhere
  8. 8. Functional Programming and Data • immutable values, not mutable objects • “change” returns a new value, leaving the old one unmodified • they’re persistent • they’re fast
  9. 9. Simple example: Linked List X
  10. 10. Simple example: Linked List Y X
  11. 11. Simple example: Linked List X Z Y
  12. 12. Simple example: Linked List X Z Y structural sharing
  13. 13. Sharing structure • space efficiency • computational efficiency – avoids copying
  14. 14. Phil Bagwell • Array Mapped Trie • Hash Array Mapped Trie
  15. 15. Bitmapped Vector Trie • data lives in the leaves • e.g. prefix tree used for string lookup • bitwise trie
  16. 16. Persistent Vector
  17. 17. Persistent Vector
  18. 18. Persistent Vector
  19. 19. Persistent Vector
  20. 20. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  21. 21. Persistent Vector getindex
  22. 22. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  23. 23. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 0b01101010
  24. 24. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 0b01101010
  25. 25. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 0b01101010
  26. 26. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 0b01101010
  27. 27. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 0b01101010
  28. 28. Persistent Vector assoc
  29. 29. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  30. 30. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  31. 31. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  32. 32. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  33. 33. Persistent Vector 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 104 105 foo 107
  34. 34. Persistent Vector Length 4 internal vectors?
  35. 35. Persistent Vector 32 From Bagwell, Rompf 2011
  36. 36. 327
  37. 37. 34,359,738,368 elements
  38. 38. demo
  39. 39. Om
  40. 40. f(D0) = V0
  41. 41. f(D1) = V1
  42. 42. diff(V0,V1) = CHANGES
  43. 43. demo
  44. 44. Persistent Data Structures … ROCK
  45. 45. Questions?
  46. 46. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations/om-clojurescript

×