Slide 1

Slide 1 text

from%the%first% love%to%a% serious% rela0onship pycon ukraine 2014 @darkproger

Slide 2

Slide 2 text

based&on&a&true& story

Slide 3

Slide 3 text

Python'is'awesome

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

zero%to%webapp%in%minutes

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

complex(webapps(for( embedded(systems

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

boring'forms

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

interac(ve*hacking

Slide 12

Slide 12 text

other&uses • data$robots,$apparently • scien'fic)compu'ng,)machine)learning,)etc • desktop)GUIs • build)tools,)system)hacking • ad

Slide 13

Slide 13 text

so#why#even#bother#looking#elsewhere?

Slide 14

Slide 14 text

movember

Slide 15

Slide 15 text

Democra(za(on thank&you&Erik&Meijer&(see&"Wisdom&of&the&cloud"&on&TEDx&Del<,&2011)

Slide 16

Slide 16 text

Educa&on

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

food hun$ng&➡&growing ➡!supermarkets

Slide 19

Slide 19 text

abstrac'on ignoring&irrelevant&details old$skills$become$impediment$in$the$new$world

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

special(human(throwing(coal( into(a(big(burning(hole

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

wheel pedals gear%s'ck

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

cloud&compu)ng distributed)systems

Slide 26

Slide 26 text

programming a = 1 # ... b = {'key': 1} # ... c = open('/System/Library/Kernels/kernel').read() # ... d = requests.get(url)

Slide 27

Slide 27 text

1950's'era'tools • state • destruc*ve,assignment • side1effects • sequen*al,composi*on

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

1950's'era'tools a = 1 # ... b = {'key': 1} # ... c = open('/System/Library/Kernels/kernel').read() # ... d = requests.get(url)

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

stuff%taking%+me!%can%no% longer%be%implicit !"Systems"Performance:"Enterprise"and"the"Cloud

Slide 32

Slide 32 text

adop%ng(a(language(to(the(new( world @asyncio.coroutine def test(): yield from asyncio.async(create()) yield from asyncio.async(write()) yield from asyncio.async(close()) yield from asyncio.sleep(2.0) loop.stop()

Slide 33

Slide 33 text

python'3

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

erlang

Slide 37

Slide 37 text

paradigm(shi+1 process'per'physical'en.ty language'+'OS 1"deserves"another"talk"really

Slide 38

Slide 38 text

(>>=)

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

(>>=) • pure&func*ons:&(+) :: Int -> Int -> Int • combinators:&fix f = f (fix f) • HOFs:&unwords . map (++ ",") . words • pa6ern&matching:&case x of Just y -> y • ADTs: data Tree a = Branch a (Tree a) (Tree a) | Leaf deriving (Functor) • persistent)data)structures

Slide 42

Slide 42 text

Lazy%evalua*on STG$machine

Slide 43

Slide 43 text

category) theory

Slide 44

Slide 44 text

• functors*<$> • semigroups*+ • applica2ves*<*> • monoids*0 + • monads*>>=

Slide 45

Slide 45 text

I"don't"use"mathema.cs"for"the"sake"of"using" mathema.cs."The"purpose"behind"structuring" programs"mathema.cally"is"to"compose"small"bits"of" mathema.cal"func.onality,"each"of"which"is"correct"in" isola.on,"to"build"larger"mathema.cal"structures" which"are"s.ll"correct. !!"haskellforall.com

Slide 46

Slide 46 text

type%checker!

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

shell

Slide 54

Slide 54 text

haskell

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

newtype Process = Process ByteString newtype Host = Host ByteString newtype Addr = Addr (IP, ByteString) data OpenFile = Connection Host Process Addr Addr | Listen Host Process Addr data IP = IP ByteString | Any type IPMap = Map IP Host

Slide 58

Slide 58 text

h"ps:/ /github.com/zalora/upcast

Slide 59

Slide 59 text

DSL$driven+development • Free%applica+ves • Free%monads • quasi%quo+ng%(php%+%sql%+%html%+%css%on%one%page% anyone?) • template%haskell • generics

Slide 60

Slide 60 text

haxl h"ps:/ /github.com/facebook/Haxl

Slide 61

Slide 61 text

numCommonFriends x y = length <$> (intersect <$> friendsOf x <*> friendsOf y) λ :t (<*>) (<*>) :: Applicative f => f (a -> b) -> f a -> f b

Slide 62

Slide 62 text

tes$ng • types • quickcheck • can/s0ll/do/tdd/if/you/like/wri0ng/tests • just/ship/it/:)

Slide 63

Slide 63 text

doing&ops • sta%c'binaries! • RTS'is'C • imporved'IO'manager'in'7.8 • lazy'evalua%on'impedes'Intel'reality • (say'something'bad'about'callbacks'here) • extended'DWARF'support'coming'in'7.10 • more'stuff'about'GHC/RTS'stacks

Slide 64

Slide 64 text

community!is!awesome you$can$find$many$(ex.)python$folks$there

Slide 65

Slide 65 text

Python: "Easy&things&are&easy,&hard& things&are&possible" Haskell: "Hard&things&are&easy,&the& impossible&just&happened"

Slide 66

Slide 66 text

kthxbai <3