#oscon

@hannelita

- Computer Engineer
- Programming
- Electronics
- Math <3 <3
- Physics
- Lego
- Meetups
- Animals
- Coffee
- GIFs

- Logic
- Functional Programming
- Intro to Lambda Calculus and Mathematical Formalism
- Type Theory

- Understand what type theory is about
- Understand its main base areas
~~Type theory general idea is too difficult to be understood in 40minutes~~~~You can't explain it with simple examples~~

- This is not an emoji
- "The value p has the type P"
- And so what? Formalism to analyse functions, implications and mathematical constructions.
- Look carefully and think about functions (form Algebra)
- D(f):{2,9} or
- Value and Types could express domains and ranges in functions!

- Write arguments that can be checked mechanically
- Study properties
- Elaborate semantic meanings
- Propositional and Predicate Logic

Sometimes the imperative mode of writing code won't help at all

WAT

- Lambda calculus
- Lisp
- Haskell
- Scala
- Clojure
- Papers
- Academia
- Category Theory
- λ
- λ
- λ

- High Order Functions
- Monoids
- Monads
- functors

amount = 20

f(change)

How can I get OSCON pants?

Attendee

f(change)

Speaker

f(change)

Speaker

+

amount = 20

amount = 20

Attendee

f(change)

f(x) => g(x) => h(x)

- Person A, 2 badges
- Person B, 4 badges
- Person C, 1 badge

- Person A, 2 badges
- Person C, 1 badge
- Person B, 4 badges

- Person B, 4 badges
- Person C, 1 badge
- Person A, 2 badges

- Person C, 1 badge
- Person A, 2 badges
- Person B, 4 badges

`Credits: @bitemyapp and @argumatronic - http://haskellbook.com/`

- Person A, 2 badge
- Person C, 1 badge
- Person B, 4 badge
- Person D, 0 Badge

(reduce + 0[100 100 100 100 100]) ;;=> 500

{A: 15},

{B: 5},

{C: 10},

{D: 5}

{Attendee, badges}

[

]

↓

{A: 15},

{B: 5},

{C: 10},

{D: 5}

Badges

donate_badge[{A: 15}]

[

]

[{A: 14}],

{B: 5},

{C: 10},

{D: 5}

[

]

[]

[ ]

[ ]

↓

↓

↓

{A: 15},

{B: 5},

{C: 10},

{D: 5}

Badges

[

]

{A: 14},

{B: 5},

{C: 10},

{D: 5}

```
(flatten donate_badge [{A:15}])
```

```
;;=> [{A: 14}, {B: 5}, {C: 10},
{D: 5}]
```

↓

↓

- Get the element
- Apply a function if convenient
- flatten and guarantee same level type on output
- Allow chained calls

- Individual Variables => x, y, z
- Applications => (e1, e2) [apply expression e1 to e2]
- Abstractions => (λx, e) [f(x) = e]

- Substitution
- Evaluation
- http://www.cs.le.ac.uk/people/amurawski/mgs2011-tlc.pdf

Ref: http://plato.stanford.edu/entries/mathematics-constructive/

Types

Functions

Propositions

Proofs

Isomorfism

Abstraction

- Naming
- Generalisations
- Derivability

And then we can analyse programming statements with Mathematics.

- IDE Inference
- Tests
- Pattern matching
- Language optimisations
- Set Theory and Group theory for analysing types

http://slides.com/hannelitavante-hannelita/pkmn_fp_tt_en

- Codeminer 42
- GIRARD, Jean-Yves.
*Proofs and Types.* - @lafp, @romulostotel, @pedrofelipee: GIFs
- B.C.
- http://www.cs.le.ac.uk/people/amurawski/mgs2011-tlc.pdf
- http://www.andres-loeh.de/LambdaPi/LambdaPi.pdf

- @bitemyapp, @argumatronic and @FunctionalWorks
- @txustice - http://blog.txus.io/
- http://www.amazon.com/Functional-Programming-Practice-Bruce-Maclennan/dp/0201137445/ref=sr_1_9?ie=UTF8&qid=1445967378&sr=8-9&keywords=functional+programming
- http://media.eurucamp.org/ (@eurucamp)
- @_leticia ('Meownads')
- http://stackoverflow.com/questions/2704652/monad-in-plain-english-for-the-oop-programmer-with-no-fp-background

Questions?

hannelita@gmail.com

@hannelita