Making Magic with F# Type Providers

  • 2,523 views
Uploaded on

Combining Data, Information, Services and Programming, at Internet-Scale …

Combining Data, Information, Services and Programming, at Internet-Scale

Presented at NDC London December 2013
Dr. Don Syme

Follow @dsyme on Twitter

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • did the ability to specify a URL as the schema go away? I can't seem to get that part to work.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
2,523
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
26
Comments
1
Likes
8

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. | Basel Making Magic with F# Type Providers Combining Data, Information, Services and Programming, at Internet-Scale Dr. Don Syme Principal Researcher, Microsoft, F# Community Contributor @dsyme
  • 2. 1 2 3 4 5 6 7
  • 3. Statically Typed Dynamically Typed
  • 4. Statically Typed Dynamically Typed A major search is on! • make statically typed langs more dynamic • make dynamically typed langs more static • moderate static typing in limited ways
  • 5. fsharp.org fsharp.org/use/mac fsharp.org/use/linux fsharp.org/use/android fsharp.org/use/ios fsharp.org/use/windows fsharp.org/use/freebsd
  • 6. F# let swap (x, y) = (y, x) let rotations (x, y, z) = [ (x, y, z); (z, x, y); (y, z, x) ] let reduce f (x, y, z) = f x + f y + f z C# Tuple<U,T> Swap<T,U>(Tuple<T,U> t) { return new Tuple<U,T>(t.Item2, t.Item1) } ReadOnlyCollection<Tuple<T,T,T>> Rotations<T>(Tuple<T,T,T> t) { new ReadOnlyCollection<int> (new Tuple<T,T,T>[] {new Tuple<T,T,T>(t.Item1,t.Item2,t.Item3); new Tuple<T,T,T>(t.Item3,t.Item1,t.Item2); new Tuple<T,T,T>(t.Item2,t.Item3,t.Item1); }); } int Reduce<T>(Func<T,int> f,Tuple<T,T,T> t) { return f(t.Item1)+f(t.Item2)+f(t.Item3); }
  • 7. 10 Reasons Not to Use a Strongly Typed Functional Language
  • 8. fsharp.org/testimonials schedule an application to balance the national power generation the calculation engine was written in F# address the complexity at the heart of this application algorithmically complex analysis of large data sets
  • 9. fsharp.org/testimonials
  • 10. F# runs on many platforms
  • 11. “F# has many contributors”
  • 12. Many perspectives http://fsharp.org
  • 13. Functional-first programming Time-to-deployment Efficiency Correctness Complexity Taming
  • 14. Examples they are particularly amenable to functional-first programming
  • 15. functional programming initial paradigm but employs other techniques such as objects and state as necessary.
  • 16. Give your world some F# spice!
  • 17. http://aws.amazon.com/tools https://github.com/aws
  • 18. http://www.windowsazure.com https://github.com/WindowsAzure/
  • 19. fsharp.org fsharp.org/math fsharp.org/data-science fsharp.org/machine-learning fsharp.org/cloud fsharp.org/data-access fsharp.net (MSDN pages)
  • 20. freebase.com
  • 21. let data = Freebase.GetDataContext() data. data.Society
  • 22. types
  • 23. SQL 05/12/2013 44
  • 24. CSV 05/12/2013 45
  • 25. JSON 05/12/2013 46
  • 26. XML 05/12/2013 47
  • 27. OData 05/12/2013 48
  • 28. Hadoop/Hive 05/12/2013 49
  • 29. World Bank 05/12/2013 50
  • 30. Azure Data Market 05/12/2013 51
  • 31. WSDL 05/12/2013 52
  • 32. WMI 05/12/2013 53
  • 33. Freebase 05/12/2013 54
  • 34. JavaScript/TypeScript 05/12/2013 55
  • 35. R 05/12/2013 56
  • 36. Demo F# + Xenomorph TimeScape An F# type provider for deep, robust integration of financial data
  • 37. data.AllEntites Data Scripters need to work with different granularities of schematization data.Automotive.``Automobile Models`` data.Automotive.``Automobile Models``.Individuals.``Porsche 911`` …Only a language that supports massively scalable metadata can operate at all these levels Every stable entity can get a unique type
  • 38. If the metadata contains units… …then these can be projected into the programming language.
  • 39. Many, many data sources are surprisingly stable Some data sources support “snapshot dates” F# supports “invalidation signals” from providers at designtime Erasure makes compiled code much less fragile
  • 40. fsharp.github.io/FSharp.Data
  • 41. In Summary Open, crossplatform, strongly typed, efficient, rocksolid stable The safe choice for enterprise data programming Unbeatable data integration Visual F# - tooling you can trust from Microsoft F#
  • 42. Questions? Give your .NET an F# edge!