SlideShare a Scribd company logo
| Basel
The F# Path to Relaxation
Language Design, Platforms, Community, Openness
Don Syme, F# Community Contributor, MSR Principal Researcher in
Mobile Tools
X Y
Functional Interop
✔
✔
✔
✖
Functional Interop
X Y
Enterprise Openness
F# is open, cross-
platform, neutral,
independent
All F# language and
tooling is accepting
contributions
The F# community is
very “self-empowered”
fsharp.org
Xamarin provide F#
tools Android and iOS
The Visual F# Tools are
Microsoft’s
professional tools for
Windows and Azure
Debian, RPM and .NET
Core for Linux/OSX
The F# Compiler
Service powers many
other tools
Fable for F#-to-
Javascript
SAFE for F# fullstack
F# 4.1 now complete!
fsharp.github.io
github.com/fsharp/fslang-design
github.com/fsharp/fslang-suggestions
✔
✔
✔
✔
✔
✔
https://github.com/fsharp/fslang-design/tree/master/FSharp-4.0
✔
✔
✔
✔
✔
✔
https://github.com/fsharp/fslang-design/tree/master/FSharp-4.1
docs.microsoft.com/en-us/dotnet/core/
fable.io
fsharp.github.io/FSharp.Compiler.Service
printfn "hello world"
✓
✓
✓
✓
✓
✓
let symbolUses =
symbolUses
|> Array.filter (fun symbolUse -> …)
|> Array.Parallel.map (fun symbolUse -> …)
|> Array.filter (fun … -> …)
|> Array.groupBy (fun … -> …)
|> Array.map (fun … ->….)
https://lukemerrett.com/fsharp-domain-modelling/
type Status =
| Online
| Unresponsive of string
| Missing of string
| NotChecked of string
| Ignored
https://medium.com/@odytrice Ody Mbegbu
type Value =
| Integer of int64
| String of string
| Date of DateTime
| Data of string
| Bool of bool
| Dict of (string * Value) list
| Array of Value list
/// The view function giving updated content for the page
let view model dispatch =
match model.Text with
| [| |] ->
div [] [ div [] [str "Loading..."] ]
| _ ->
div [ ClassName "container" ] [
button [ OnClick (fun _ -> dispatch Faster) ] [ str "Faster" ]
div [ ClassName "theText" ] [ str model.Text.[model.Index] ]
button [ OnClick (fun _ -> dispatch Slower) ] [ str "Slower" ]
div [] [ str (sprintf "Ticks Per Update: %d" model.TicksPerUpdate) ]
]
A functional-reactive
dynamic web view
/// The view function giving updated content for the page
let view (model: Model) dispatch =
if model.Pressed then
Xaml.Label(text="I was pressed!")
else
Xaml.Button(text="Press Me!", command=(fun () -> dispatch Pressed))
A functional-reactive mobile
app view
type Msg = | Pressed
type Model = { Pressed: bool }
let init() = { Pressed=false }
let update msg model =
match msg with
| Pressed -> { model with Pressed = true }
let view (model: Model) dispatch =
if model.Pressed then
Xaml.abel(text="I was pressed!")
else
Xaml.Button(text="Press Me!", command=(fun () -> dispatch Pressed))
type App () =
inherit Application ()
do Program.run init update view
A full Xamarin mobile app
The messages
The initial model
The update function
The dynamic view
Host+run
github.com/fsprojects/Elmish.XamarinForms/
The model
✔
Enterprise Openness
X Y
Functional Objects
type Vector2D (dx:double, dy:double) =
let d2 = dx*dx+dy*dy
member v.DX = dx
member v.DY = dy
member v.Length = sqrt d2
member v.Scale(k) = Vector2D (dx*k, dy*k)
Inputs to object
construction
Exported properties
Exported method
Object internals
Object Interface Types
type IObject =
interface ISimpleObject
abstract Prop1 : type
abstract Meth2 : type -> type
Object Expressions
{ new IObject with
member x.Prop1 = expr
member x.Meth1 args = expr }
{ new Object() with
member x.Prop1 = expr
interface IObject with
member x.Meth1 args = expr
interface IWidget with
member x.Meth1 args = expr }
Constructed Class Types
type ObjectType(args) =
let internalValue = expr
let internalFunction args = expr
let mutable internalState = expr
member x.Prop1 = expr
member x.Meth2 args = expr
objects as a single paradigm
overuse of hierarchical classification
large abstractions many holes failure points
declarations expressions
complex inheriting complex
✔
Functional Objects
fsharp.org/testimonials
350,000
lines of C# OO
by offshore team
30,000
lines of robust F#, with
parallel +more features
An application to evaluate the revenue due from Balancing Services contracts in
the UK energy industry
http://simontcousins.azurewebsites.net/does-the-language-you-use-make-a-
difference-revisited/
Zero
bugs in deployed system
“F# is the safe choice for this project,
any other choice is too risky”
An application to evaluate the revenue due from Balancing Services contracts in the
UK energy industry
http://simontcousins.azurewebsites.net/does-the-language-you-use-make-a-
difference-revisited/
X Y
Pattern
Matching
Abstraction
module BasicPatterns =
let (|Value|_|) (e:FSharpExpr) = ...
let (|Const|_|) (e:FSharpExpr) = ...
let (|TypeLambda|_|) (e:FSharpExpr) = ...
let (|Lambda|_|) (e:FSharpExpr) = ...
let (|Application|_|) (e:FSharpExpr) = ...
let (|IfThenElse|_|) (e:FSharpExpr) = ...
let (|Let|_|) (e:FSharpExpr) = ...
let (|LetRec|_|) (e:FSharpExpr) = ...
let (|NewRecord|_|) (e:FSharpExpr) = ...
let (|NewUnionCase|_|) (e:FSharpExpr) = ...
let (|NewTuple|_|) (e:FSharpExpr) = ...
let (|TupleGet|_|) (e:FSharpExpr) = ...
let (|IdentifierNameSyntax|_|) (n: CSharpSyntaxNode) =
match n with
| :? IdentifierNameSyntax as t -> Some(t.CSharpKind(), t.Identifier)
| _ -> None
let (|IdentifierName|_|) (n: CSharpSyntaxNode) =
match n.CSharpKind() with
| SyntaxKind.IdentifierName -> ...
| _ -> None
let (|QualifiedNameSyntax|_|) (n: CSharpSyntaxNode) =
match n with
| :? QualifiedNameSyntax as t -> ...
| _ -> None
let (|QualifiedName|_|) (n: CSharpSyntaxNode) =
match n.CSharpKind() with
| SyntaxKind.QualifiedName -> ...
| _ -> None
✔
Pattern
Matching
Abstraction
Code Data
1 2 3 4 5 6 7
2012 2013
6,432 10,537
Statically
Typed
Dynamically
Typed
Options
• make statically typed langs more
dynamic
• make dynamically typed langs more
static
• apply moderated static typing much
more broadly
http://fsharp.github.io/FSharp.Data/images/csv.gif
http://fsharp.github.io/FSharp.Data/images/wb.gif
types
Segoe UI Light
01/06/2018 70
01/06/2018 71
01/06/2018 72
01/06/2018 73
01/06/2018 74
01/06/2018 75
01/06/2018 76
01/06/2018 77
01/06/2018 78
01/06/2018 79
integrating internet-scale information services
directly into the program's variable and type space is
probably the most innovative programming language
idea I’ve heard of in a decade
✔ ✔
Code Data
X Y
Sync Async
Numbers
Numbers-
with Units
Synthesis from
contradiction is at
the heart of applied
PL design
Opposites come in
all shapes and
flavours
Achieve relaxation
today ☺
Code Data
Functi
onal
Objec
ts
Open
Enter
prise
Sync Async
… …
Thank you!!
Questions?

More Related Content

Similar to The F# Path to Relaxation

Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
Hasktut
HasktutHasktut
Hasktut
kv33
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
pbarasia
 

Similar to The F# Path to Relaxation (20)

Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The Basics
 
Untangling8
Untangling8Untangling8
Untangling8
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Vb introduction.
Vb introduction.Vb introduction.
Vb introduction.
 
F# and Reactive Programming for iOS
F# and Reactive Programming for iOSF# and Reactive Programming for iOS
F# and Reactive Programming for iOS
 
Scope of variables
Scope of variablesScope of variables
Scope of variables
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
 
Scope of variables
Scope of variablesScope of variables
Scope of variables
 
Hasktut
HasktutHasktut
Hasktut
 
ArduinoWorkshop2.pdf
ArduinoWorkshop2.pdfArduinoWorkshop2.pdf
ArduinoWorkshop2.pdf
 
Presentation on use of r statistics
Presentation on use of r statisticsPresentation on use of r statistics
Presentation on use of r statistics
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk Pemula
 
Drupaljam xl 2019 presentation multilingualism makes better programmers
Drupaljam xl 2019 presentation   multilingualism makes better programmersDrupaljam xl 2019 presentation   multilingualism makes better programmers
Drupaljam xl 2019 presentation multilingualism makes better programmers
 
Foss
FossFoss
Foss
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
3.5
3.53.5
3.5
 
Geeks Anonymes - Le langage Go
Geeks Anonymes - Le langage GoGeeks Anonymes - Le langage Go
Geeks Anonymes - Le langage Go
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_arguments
 
golang_getting_started.pptx
golang_getting_started.pptxgolang_getting_started.pptx
golang_getting_started.pptx
 
Python for dummies
Python for dummiesPython for dummies
Python for dummies
 

More from J On The Beach

Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
J On The Beach
 
Axon Server went RAFTing
Axon Server went RAFTingAxon Server went RAFTing
Axon Server went RAFTing
J On The Beach
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
J On The Beach
 
Machine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind LibrariesMachine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind Libraries
J On The Beach
 

More from J On The Beach (20)

Massively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard wayMassively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard way
 
Big Data On Data You Don’t Have
Big Data On Data You Don’t HaveBig Data On Data You Don’t Have
Big Data On Data You Don’t Have
 
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
 
Pushing it to the edge in IoT
Pushing it to the edge in IoTPushing it to the edge in IoT
Pushing it to the edge in IoT
 
Drinking from the firehose, with virtual streams and virtual actors
Drinking from the firehose, with virtual streams and virtual actorsDrinking from the firehose, with virtual streams and virtual actors
Drinking from the firehose, with virtual streams and virtual actors
 
How do we deploy? From Punched cards to Immutable server pattern
How do we deploy? From Punched cards to Immutable server patternHow do we deploy? From Punched cards to Immutable server pattern
How do we deploy? From Punched cards to Immutable server pattern
 
Java, Turbocharged
Java, TurbochargedJava, Turbocharged
Java, Turbocharged
 
When Cloud Native meets the Financial Sector
When Cloud Native meets the Financial SectorWhen Cloud Native meets the Financial Sector
When Cloud Native meets the Financial Sector
 
The big data Universe. Literally.
The big data Universe. Literally.The big data Universe. Literally.
The big data Universe. Literally.
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
 
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
 
Pushing AI to the Client with WebAssembly and Blazor
Pushing AI to the Client with WebAssembly and BlazorPushing AI to the Client with WebAssembly and Blazor
Pushing AI to the Client with WebAssembly and Blazor
 
Axon Server went RAFTing
Axon Server went RAFTingAxon Server went RAFTing
Axon Server went RAFTing
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
 
Servers are doomed to fail
Servers are doomed to failServers are doomed to fail
Servers are doomed to fail
 
Interaction Protocols: It's all about good manners
Interaction Protocols: It's all about good mannersInteraction Protocols: It's all about good manners
Interaction Protocols: It's all about good manners
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
 
Leadership at every level
Leadership at every levelLeadership at every level
Leadership at every level
 
Machine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind LibrariesMachine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind Libraries
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 

The F# Path to Relaxation