Bay NET Aug 19 2009 presentation ppt


Published on

Art Language Machine

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 08/20/09 23:55 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • Bay NET Aug 19 2009 presentation ppt

    1. 1. How F#, Many/Multi-Core, and , Parallel and Concurrent Changed My World or Learning to have FUN with F# by Art Scott Artist Semasiographologist
    2. 2. Bay .NET trailer using Windows Moviemaker
    3. 3. The Multi-Core Revolution Loop’n Luca Lollapalooza Loop’n Mix: Luca Bolognese Interview and Django Reinhardt The World Is Waiting For The Sunrise
    4. 4. The Engelbart Mural ... 40th anniversary celebrations of Douglas C. Engelbart's "Mother of All Demos", ... traces the evolution of culture and technology from 1925 to present, from the perspective of the life of Doug Engelbart, inventor of the computer mouse and other technological breakthroughs that changed the world. F#
    5. 5. F# & Many/Multi-Core Chall e nges <ul><li>You </li></ul><ul><ul><ul><li>Professional -- Work Solutions </li></ul></ul></ul><ul><ul><ul><li>Personal -- Home Enjoyment </li></ul></ul></ul><ul><li>Everyone else </li></ul><ul><ul><li>Software </li></ul></ul><ul><ul><ul><li>Microsoft, Oracle/Sun, IBM, Google, et al </li></ul></ul></ul><ul><ul><li>Systems Providers </li></ul></ul><ul><ul><ul><li>Devices: DT, Laptop, Palm Top, Mobile, Game, etc. </li></ul></ul></ul><ul><ul><li>Chips </li></ul></ul><ul><ul><ul><li>Intel, AMD, IBM, ARM, ... </li></ul></ul></ul>
    6. 6. F# & Many/Multi-Core Opportunities <ul><li>You </li></ul><ul><ul><li>Professional Development </li></ul></ul><ul><ul><li>FUN </li></ul></ul>
    7. 7. <ul><li>A (really) quick review of some F# history, </li></ul><ul><li>a bit more on the state of the F# art, and </li></ul><ul><li>a few forward looking F# observations. </li></ul>
    8. 8. <ul><li>A (really) quick review of some </li></ul><ul><li>F# history </li></ul>
    9. 9. F#: Influences Similar core language Similar object model F#
    10. 10. F# Roadmap History <ul><ul><li>Improvements to the F# research release </li></ul></ul>April 2008 Microsoft Research refresh release <ul><ul><li>Broadly improved VS 2008 integration </li></ul></ul><ul><ul><li>Simplifications in language and libraries </li></ul></ul>Just Released September 2008 CTP <ul><ul><li>Full product-quality release </li></ul></ul><ul><ul><li>Fully stable and supported language </li></ul></ul><ul><ul><li>Aligned with future VS releases </li></ul></ul>2009 Supported Release
    11. 11. 2. a bit more on the state of the F# art
    12. 12. F# Resources <ul><li>On the Web: </li></ul><ul><ul><li> </li></ul></ul><ul><li>Check for status of Second Editions </li></ul>
    13. 13. The Path to Mastering F# Topic Scoping and “let” Tuples Pattern Matching Working with Functions Sequences, Lists, Options Records and Unions Basic Imperative Programming Basic Objects and Types The F# Libraries Advanced Functional/Imperative Advanced Functional/OO Language Oriented Programming Parallel and Asynchronous
    14. 14. F# Succinct, Expressive, Functional The F# Team Microsoft Developer Division Microsoft Research Don-Syme
    15. 15. Code! <ul><li>//F# </li></ul><ul><li>open System </li></ul><ul><li>let a = 2 </li></ul><ul><li>Console.WriteLine a </li></ul>//C# using System; namespace ConsoleApplication1 { class Program { static int a() { return 2; } static void Main(string[] args) { Console.WriteLine(a); } } } More Noise Than Signal!
    16. 16. <ul><li>Pleasure </li></ul><ul><li>  </li></ul><ul><li>type Command = Command of (Rover -> unit) </li></ul><ul><li>let BreakCommand     = </li></ul><ul><li>Command(fun rover -> rover.Accelerate(-1.0)) </li></ul><ul><li>let TurnLeftCommand  = </li></ul><ul><li>Command(fun rover -> rover.Rotate(-5.0<degs>)) </li></ul><ul><li>  </li></ul><ul><li>Pain </li></ul><ul><li>   abstract class Command </li></ul><ul><li>    { </li></ul><ul><li>        public virtual void Execute(); </li></ul><ul><li>    } </li></ul><ul><li>    abstract class MarsRoverCommand : Command </li></ul><ul><li>    { </li></ul><ul><li>        protected MarsRover Rover { get; private set; } </li></ul><ul><li>  </li></ul><ul><li>        public MarsRoverCommand(MarsRover rover) </li></ul><ul><li>        { </li></ul><ul><li>            this.Rover = rover; </li></ul><ul><li>        } </li></ul><ul><li>    } </li></ul><ul><li>    class BreakCommand : MarsRoverCommand </li></ul><ul><li>    { </li></ul><ul><li>        public BreakCommand(MarsRover rover) </li></ul><ul><li>            : base(rover) </li></ul><ul><li>        { </li></ul><ul><li>        }  </li></ul><ul><li>         public override void Execute() </li></ul><ul><li>        { </li></ul><ul><li>            Rover.Rotate(-5.0); </li></ul><ul><li>        } </li></ul><ul><li>    } </li></ul><ul><li>class TurnLeftCommand : MarsRoverCommand </li></ul><ul><li>    { </li></ul><ul><li>        public TurnLeftCommand(MarsRover rover) </li></ul><ul><li>            : base(rover) </li></ul><ul><li>        { </li></ul><ul><li>        } </li></ul><ul><li>         public override void Execute() </li></ul><ul><li>        { </li></ul><ul><li>            Rover.Rotate(-5.0); </li></ul><ul><li>        } </li></ul><ul><li>    } </li></ul>
    17. 17. The Path to Mastering F# Topic Scoping and “let” Tuples Pattern Matching Working with Functions Sequences, Lists, Options Records and Unions Basic Imperative Programming Basic Objects and Types The F# Libraries Advanced Functional/Imperative Advanced Functional/OO Language Oriented Programming Parallel and Asynchronous
    18. 18.
    19. 19.
    20. 20.
    21. 21. F# - An Introduction Under an Application of Quantitative Finance Christopher J. Barwick a.k.a. optionsScalper Affiliated with: JJB Research
    22. 22. Purpose <ul><li>To provide a sample perspective on the use of technology in capital markets. </li></ul><ul><li>To apply a few common techniques in capital markets to everyday situations. </li></ul><ul><li>To use .NET to implement these ideas and in particular to leverage F# as the language for mathematics computation . </li></ul>
    24. 24. Millennial Hot Topic F# & Many/Multi-Core Technical & Business Chall e nges & Opportunities Hubble’s Eye View Electron’s Eye View
    25. 25. Machine
    26. 28. I/O and compute intensive programs Image oriented access and processing operations are often both compute and I/O intensive .
    27. 29. Nov 17 - 19 PDC09 LA CC <ul><li>Patterns of Parallel Programming </li></ul><ul><li>Richard Ciapala , Ade Miller , Herb Sutter , Stephen Toub </li></ul><ul><li>The transition from single-core to multi-core technology is altering computing as we know it , enabling increased productivity, powerful energy-efficient performance, and leading-edge advanced … </li></ul>
    28. 30. Nov 17 - 19 PDC09 LA CC <ul><li>The State of Parallel Programming </li></ul><ul><li>Burton Smith </li></ul><ul><li>Parallel programming has been more difficult than it needs to be, perhaps because its tools have been treated as an “add-on” to serial programming. The objectives of composability and productivity … </li></ul>
    29. 31. Nov 17 - 19 PDC09 LA CC <ul><li>Manycore and the Microsoft .NET Framework 4: A Match Made in Microsoft Visual Studio 2010 </li></ul><ul><li>Stephen Toub </li></ul><ul><li>The Microsoft .NET Framework 4 and Visual Studio 2010 include new technologies for expressing, debugging, and tuning parallelism in managed applications. Dive into key areas of support, including the new System.Threading.Tasks and System.Collections.Concurrent namespaces, cutting-edge concurrency views in the Visual Studio profiler, and debugger tool windows for analyzing the state of concurrent code. </li></ul>
    30. 32. <ul><li>Effective Concurrency: Design for Manycore Systems </li></ul><ul><li>August 11 , 2009 by Herb Sutter </li></ul><ul><li>Why worry about “manycore” today ? </li></ul><ul><li>… building a typical mainstream application right now? …, &quot;many-core&quot; systems still feel fairly remote, not an immediate issue to think about as developers are working on their current product. </li></ul><ul><li>… why it’s time right now for most of us to think about systems with lots of cores. </li></ul><ul><li>In short: Software is the (only) gating factor ; as that gate falls, hardware parallelism is coming more and sooner than many people yet believe. … </li></ul>
    31. 33. The Problem with Threads, Edward A. Lee Intel, for example, has embarked on an active campaign to get leading computer science academic programs to put more emphasis on multi-threaded programming. If they are successful , and the next generation of programmers makes more intensive use of multithreading, then the next generation of computers will become nearly un usable .   EECS Department, University of California, Berkeley Technical Report No. UCB/EECS-2006-1, January 10, 2006 Threads are a seemingly straightforward adaptation of the dominant sequential model of computation to concurrent systems. Languages require little or no syntactic changes to support threads, and operating systems and architectures have evolved to efficiently support them.
    32. 34. F# Async/Parallel
    33. 35. In Praise of Immutability <ul><li>Immutable objects can be relied upon </li></ul><ul><li>Immutable objects can transfer between threads </li></ul><ul><li>Immutable objects can be aliased safely </li></ul><ul><li>Immutable objects lead to (different) optimization opportunities </li></ul>
    34. 36. The Solution <ul><li>Good Architecture </li></ul><ul><ul><li>Know your techniques </li></ul></ul><ul><ul><li>Know your requirements </li></ul></ul><ul><ul><li>Know your limits (CPU, disk, network, latency) </li></ul></ul><ul><li>Translate Good Architecture into Good Code with F# </li></ul><ul><ul><li>A great platform </li></ul></ul><ul><ul><li>A massive increase in isolation and immutability </li></ul></ul><ul><ul><li>A massive reduction in mutation </li></ul></ul>In parallel programming, F# is a power tool for good architects and good developers
    35. 37. Immutability the norm… Values may not be changed Data is immutable by default  Not Mutate  Copy & Update
    36. 38. An Introduction To Microsoft F#  Luca Bolognese Principal Languages PM Microsoft Corporation TL11
    37. 39. Luca Bolognese’s Blog <ul><li>All functional languages are enjoying a renaissance of sort (Erlang anyone?). </li></ul><ul><li>A strong reason is the multicore revolution that is upon us. </li></ul><ul><li>Functional languages, with their lack of side effects, are good for parallelization . </li></ul><ul><li>Also, with LINQ we brought functional concepts in a mainstream programming language. We made them a bit more familiar to people. </li></ul><ul><li>When you put all these things together you get a lollapalooza effect. </li></ul><ul><li>Sunday, November 09, 2008 9:33 AM by lucabol </li></ul>
    38. 40. The F# language Tom áš Petříček Microsoft C # MVP
    39. 41. Why inventing another language? <ul><li>Programs today are hard to parallelize </li></ul><ul><ul><li>Using threads leads to nondeterministic behavior </li></ul></ul><ul><li>Some ideas are difficult to express </li></ul><ul><ul><li>Declarative programming is easier to understand </li></ul></ul><ul><li>In OOP you can easily write reusable type </li></ul><ul><ul><li>But writing reusable function/algorithm isn’t that simple </li></ul></ul><ul><li>Sometimes you need to target multiple “runtimes” </li></ul><ul><ul><li>For example CLR, SQL and JavaScript hosted in browser </li></ul></ul><ul><ul><li>In F# it is possible to “compile” F# code to other languages </li></ul></ul>
    40. 43. F# <ul><li>F# - Succinct </li></ul><ul><li>F# - Expressive </li></ul><ul><li>F# - Efficient </li></ul><ul><li>F# - Functional Programming for .NET </li></ul>
    42. 45. My focus Opportunity, the EYES have it 6.3 B Couch Potatoes = 12.6 B Eyes
    43. 46. MadAve – home of world class Semasiographologists CaT: Creativity and Technology diverse group of thinkers and doers pushing boundaries in the digital realm
    44. 47. adPredict Eye Catching <ul><li>Current Top 10 </li></ul><ul><li>1. World Wildlife Fund (7) </li></ul><ul><li>2. Batman (6.8) </li></ul><ul><li>3. Coca-Cola (6.8) </li></ul><ul><li>4. Nike Classic (6.8) </li></ul><ul><li>5. BMW (6.8) </li></ul>
    45. 48. The SIGGRAPH Art Show Since the earliest SIGGRAPH conferences, an essential part of our community has been those artists and researchers who use the computer as part of their creative process.
    46. 49. International Computer Art Forum
    47. 50. ART
    48. 51. John Whitney Sr.
    49. 52. Duane Palyka StrokeDance use my software to “jam” with dancers and actors in the same way as musicians do—in a creative performance setting. 
    50. 53. Alvy Ray Smith <ul><li>Norman Courtney - Glass Art Nagare (Flow) , 1998, cast glass public artwork is in the Centennial Center lobby, Kent, WA. It features a &quot;parquet deformation&quot; of tiles that change horizontally ever so slightly while maintaining perfect fit - a melody of crystalline music. Alvy supplied the geometry for this piece. </li></ul>
    51. 54. Computer Graphics and Geometric Ornamental Design Craig S. Kaplan. PhD thesis, 2002
    52. 55. Influences <ul><li>Stan Brakhage , many </li></ul><ul><li>Ricky Leacock, Woodstock w/ D.A. Pennebaker </li></ul><ul><li>Steve Coons, Ivan Sutherland’s dissertation advisor </li></ul><ul><li>MC Escher, Walt Disney, ... </li></ul>
    53. 56. LANGUAGE <ul><li>Semasiographic </li></ul><ul><ul><li>writing represents “meanings” </li></ul></ul><ul><ul><li>semasiographic systems are independent graphic languages not tied to any one spoken language </li></ul></ul><ul><li>Glottographic </li></ul><ul><ul><li>writing represents “sounds” </li></ul></ul><ul><ul><li>glottographic systems use visible marks to represent elements of a specific spoken language </li></ul></ul>
    54. 57. Machine
    57. 60. <ul><li>&quot;... As with the invention of writing (or even language) itself, the deep integration of motion pictures and computation will bring about entirely new possibilities for human expression and communication. ...“ </li></ul><ul><li>Today we are constantly reading images and image sequences, but we write very little. Future computational semasiographic technology has the possibility of initiating a revolution in the development of semasiographic writing systems by making it far easier to write semasiographic motion pictures. </li></ul><ul><ul><li>see ref. : </li></ul></ul>SEMASIOGRAPHIC
    58. 61. <ul><li>The first two levels of Geoffrey Sampson’s taxonomy of writing systems divides writing systems into semasiographic which represents “ meanings ” (from the Greek semasi “meaning”), and glottographic which represents “sounds” (from the Greek glotto “tongue” or “language”). </li></ul>
    59. 62. <ul><li>Current video editing technology is like word processing with bitmaps. … </li></ul><ul><li>Just as we often find it hard to imagine our own civilization before the advent of widespread literacy in the 17th and 18th centuries, in the next century our descendants will find it hard to understand that while everyone watched movies, videos, and TV, so few had the tools to make them. </li></ul>
    60. 63. FUNCTIONAL <ul><li>Say WHAT you want to do </li></ul><ul><li>Domain Specific Languages </li></ul>
    63. 66. <ul><li>The development of a computational semasiographic writing enabling us to use computational video as a mother tongue. </li></ul>SYM MORPH METRY
    64. 67. <ul><li>How can video be used functionally, how can we program it and program with it? How can we use its ability to record and construct events in the world in a way analogous to how computational writing captures processes as objects and uses them to build new processes? </li></ul><ul><li>As with the invention of writing (or even language) itself, the deep integration of motion pictures and computation will bring about entirely new possibilities for human expression and communication. </li></ul>
    65. 68. <ul><li>ALTHOUGH WE ARE LIVING IN THE “COMPUTER AGE,” THE FULL IMPLICATIONS of computational ideas have not been realized in our century. We are at the early apparatus phase of computational development—the profound ideas of computation have not yet affected all other fields of human inquiry, especially our thinking about media . As computational ideas transform our thinking about media, new apparatuses and new ideas will emerge that will change our relationships to media and to each other. The ways we create, communicate, and play will become computationally revisioned, transforming us in the process. </li></ul>
    66. 69. F# <ul><li>High signal to noise </li></ul><ul><li>Don Syme's WebLog on the F# Language and Related Topics </li></ul><ul><li>An Introduction to Microsoft F# | pdc2008 | Channel 9 </li></ul><ul><li>“ let” #1, “|>” #2 -- now you know 2/3 of F# </li></ul><ul><li>“ fun” #3 -- 3 keywords -- 90% of your code </li></ul><ul><li>First Class .NET Language as of VS 2010 </li></ul><ul><li>Multi-Paradigm = pragmatic: </li></ul><ul><ul><li>FUNctional </li></ul></ul><ul><ul><ul><li>Object Oriented </li></ul></ul></ul><ul><ul><ul><li>Imperative </li></ul></ul></ul>
    67. 70. 3. and a few forward looking F# observations
    68. 71. F# Roadmap Today Interview <ul><ul><li>CodeCast Episode 32: </li></ul></ul><ul><ul><ul><li>Roadmap for VB, C#, and F# </li></ul></ul></ul><ul><ul><ul><li>with Luca Bolognese </li></ul></ul></ul>Friday, July 17, 2009 <ul><ul><li>VS 2010 </li></ul></ul><ul><ul><li>additional library functions (e.g. ) available with .NET 4.0/Visual Studio 2010 Beta1 </li></ul></ul>VS2010 Almost Released Soon <ul><ul><li>PDC09 LA CC </li></ul></ul><ul><ul><li>Co-Evolution </li></ul></ul><ul><ul><li>AXUM, ... Stay tuned </li></ul></ul>2010, 2011 and Beyond ??
    69. 72. Don Syme Blog <ul><li>custom numeric type literals, ... interoperate nicely with the BigInteger type on .NET 4.0 , </li></ul><ul><li>... improved aspects of .NET interoperability ... smoother calling of .NET param array methods .  </li></ul><ul><li>... support for units-of-measure with integer types, e.g. to qualify integer types by annotations such as <Pixels> or <Clicks>. </li></ul><ul><li>focusing on the performance of F# language constructs ... performance improvements to F# sequence expressions , … </li></ul><ul><li>F# classes have compact representations , and that some other constructs such as F# members taking arguments in curried form are compiled more efficiently. ... detail in the detailed release notes . </li></ul>
    70. 73. The Co-Evolution Roadmap for VB, C#, and F# with Luca Bolognese <ul><li>Friday, July 17, 2009 CodeCast Episode 32: ... in the guest interview, ... Luca Bolognese who is the group program manager at Microsoft on the Visual Studio languages team. Luca talks about the roadmap for co-evolution of VB, C# -- and, F# (@34:50) languages beyond Visual Studio 2010. </li></ul>
    71. 74. F# Co-Evolution ROADMAP <ul><li>F# </li></ul><ul><li>.NET 4 </li></ul><ul><li>WPF </li></ul><ul><ul><li>DX, XNA </li></ul></ul><ul><li>Silverlight, Expression, XAML </li></ul><ul><li>Azure, LINQ, PLINQ </li></ul><ul><li>AXUM </li></ul>
    72. 75. MSDN Parallel Computing Developer Center
    73. 76. Hello Axumites! ... Awesome
    74. 77. Microsoft Research <ul><li>Dryad/DryadLINQ and Project Trident Released </li></ul><ul><li>There has been a lot of talk going around involving the Microsoft Worldwide Partner Conference 2009 , but another event, largely overshadowed, was the 10th annual Microsoft Research Faculty Summit .  two tools to help transform research in the academic world, Project Trident and Dryad with DryadLINQ, </li></ul>
    75. 78. PARALLEL CONCURRENT <ul><li>Today’s challenge </li></ul><ul><ul><li>How we think about: </li></ul></ul><ul><ul><ul><li>The silicon </li></ul></ul></ul><ul><ul><ul><li>The software </li></ul></ul></ul><ul><ul><ul><li>The applications </li></ul></ul></ul>
    77. 81. Acknowledgements <ul><li>Dr. Don Syme – The Don of F# </li></ul><ul><li>Dr. Jon Harrop – F# Tilings Article </li></ul><ul><ul><li> </li></ul></ul><ul><li>Robert Pickering, and other F# authors </li></ul><ul><li>All the F# Web Sites and their authors </li></ul><ul><li>All revisions and errors are obviously mine alone. </li></ul>
    78. 82. Thank you for coming. Have F# UN! <ul><li>Contact me </li></ul><ul><ul><li>“ art(( at ))” – New. </li></ul></ul><ul><ul><li>“ art_scott (( at ))” – Long time. </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul>