Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mobile F#un

1,097 views

Published on

Presentation on F# at Windows Apps London meetup at Microsoft's Offices near Paddington

Published in: Software
  • Be the first to comment

Mobile F#un

  1. 1. MOBILE F#UN P H I L L I P T R E L F O R D ( A K A S E A N ’ S D A D ) W I N D O W S A P P S L O N D O N 2 0 1 6
  2. 2. F#UNCTIONAL LONDONERS • Founded Feb 2010 • 1100+ Members • Meets every 2-4 weeks • Topics include – Machine Learning – Finance – Games – Web http://meetup.com/fsharplondon
  3. 3. VISUAL F#
  4. 4. THE F IN F# IS FOR FUN!
  5. 5. HALO 3 WITH F# SKILLS
  6. 6. XBLA: PATH TO GO – F# AI
  7. 7. F# • Statically Typed • Functional First • Object Orientated • Open Source • .Net language • In Visual Studio & Xamarin Studio
  8. 8. F# INFLUENCES // OCaml + Python like light syntax let dist (x1,y1) (x2,y2) = let x = x1 - x2 in let y = y2 - y1 in sqrt (x * x + y * y) // & C# dot-driven development let trim (s:string) = s.Trim() F# OCaml Python C#
  9. 9. C# + F# = BEST FRIENDS Kaggle Testimonial “we have a large existing code base in C#, …getting started with F# was an easy decision.” “The F# code is consistently shorter, easier to read, easier to refactor and contains far fewer bugs. …we’ve become more productive.” Source: http://fsharp.org/testimonials/
  10. 10. ASK ME ANYTHING
  11. 11. F# IN INDUSTRYP H I L T R E L F O R D , @ P T R E L F O R D W I N D O W S A P P L O N D O N , 2 0 1 6
  12. 12. F# STARTUPS: JET.COM $570M RAISED
  13. 13. ONIKIRA – DEMON KILLER: AVAILABLE ON STEAM
  14. 14. F# ON FACEBOOK: MONOPOLY
  15. 15. F# ARCHITECTURE VISIBLE FROM SPACE
  16. 16. F# LANGUAGEP H I L T R E L F O R D , @ P T R E L F O R D W I N D O W S A P P L O N D O N , 2 0 1 6
  17. 17. CODE: FIZZBUZZ WITH IF/THEN/ELSE for i = 1 to 100 do let text = if i % 3 = 0 && i % 5 = 0 then "FizzBuzz" elif i % 3 = 0 then "Fizz" elif i % 5 = 0 then "Buzz" else i.ToString() Console.WriteLine(text)
  18. 18. CODE: FIZZBUZZ WITH PATTERN MATCHING for i = 1 to 100 do match i%3, i%5 with | 0, 0 -> "FizzBuzz" | 0, _ -> "Fizz" | _, 0 -> "Buzz" | _, _ -> i.ToString() |> Console.WriteLine
  19. 19. CODE GOLF: FIZZBUZZ
  20. 20. TYPES: LIGHT SYNTAX F# type Person(name:string,age:int) = /// Full name member person.Name = name /// Age in years member person.Age = age C# public class Person { public Person(string name, int age) { _name = name; _age = age; } private readonly string _name; private readonly int _age; /// <summary> /// Full name /// </summary> public string Name { get { return _name; }
  21. 21. TYPE PROVIDERS: JSON open FSharp.Data type Person = JsonProvider<""" { "name":"Name", "age":64 } """> let thomas = Person.Parse(""" { "name":"Thomas", "age":12 } """) person.Age
  22. 22. SQL TYPE PROVIDER
  23. 23. SEAN (8) LIVE CODING AT NDC OSLO
  24. 24. F# FOR APPSP H I L T R E L F O R D , @ P T R E L F O R D W I N D O W S A P P L O N D O N , 2 0 1 6
  25. 25. TARGET OVER 2.2 BILLION DEVICES NATIVELY WITH F# NATIVELY VIA .NET & MONO • Android • iOS • Linux • Mac • Windows • Raspberry Pi • etc. AND DON’T FORGET VIA WEB Everything else with • Fable • Freya • FunScript • Suave • WebSharper • etc.
  26. 26. MOBILE WITH F# • Xamarin Studio – iOS – Android – Windows mobile • JS – Apache Cordova – Appcelerator – Sencha – …
  27. 27. EXAMPLE APPS BUILT WITH F# Learn on the Go | WP Pissed off Owls| iOS Pool | WebGL
  28. 28. MARIO TUTORIAL
  29. 29. FLAPPY BIRD WITH MONOGAME
  30. 30. http://tinyurl.com/funbasi c FUN BASIC - WINDOWS STORE APP
  31. 31. F# RESOURCESP H I L T R E L F O R D , @ P T R E L F O R D W I N D O W S A P P L O N D O N , 2 0 1 6
  32. 32. •F# Software Foundation http://www.fsharp.org software stacks trainings teaching F# user groups snippets mac and linux cross-platform books and tutorials F# community open-source MonoDevelop contributions research support consultancy mailing list
  33. 33. F# KOANS //--------------------------------------------------------------- // About Let // // The let keyword is one of the most fundamental parts of F#. // You'll use it in almost every line of F# code you write, so // let's get to know it well! (no pun intended) //--------------------------------------------------------------- [<Koan(Sort = 2)>] module ``about let`` = [<Koan>] let LetBindsANameToAValue() = let x = 50 AssertEquality x __
  34. 34. SERGEY TIHON’S F# WEEKLY
  35. 35. BUY THE BOOK
  36. 36. QUESTIONS? • Twitter – @ptrelford • Blog – http://trelford.com/blog

×