Adventures in Elm GOTO Chicago, 24 May 2016 Adventures in Elm - - PowerPoint PPT Presentation

adventures in elm
SMART_READER_LITE
LIVE PREVIEW

Adventures in Elm GOTO Chicago, 24 May 2016 Adventures in Elm - - PowerPoint PPT Presentation

Adventures in Elm GOTO Chicago, 24 May 2016 Adventures in Elm Events, Reproducibility, and Kindness question your principles @jessitron Adventures in Elm Events, Reproducibility, and Kindness Data Data In Out Server UI Everything My


slide-1
SLIDE 1

Adventures in Elm

GOTO Chicago, 24 May 2016

slide-2
SLIDE 2

Adventures in Elm

Events, Reproducibility, and Kindness

question your principles

slide-3
SLIDE 3

Adventures in Elm

Events, Reproducibility, and Kindness

@jessitron

slide-4
SLIDE 4

Data In Data Out

slide-5
SLIDE 5

UI Server

slide-6
SLIDE 6

Everything that matters My Dream Appearance

slide-7
SLIDE 7

+ React ClojureScript + Om Scala.js + React + Redux JavaScript

slide-8
SLIDE 8

language architecture system

slide-9
SLIDE 9

undefined is not a function

slide-10
SLIDE 10

@mrb_bk “I tried over and over again to turn my self doubt into a pure functional program, and eventually, it clicked.”

slide-11
SLIDE 11

substring qty string = … peelerLocation = substring 3 "STL-48" locations = ["STL", "ORD"] substring : Int -> String -> String peelerLocation : String locationCode = substring 3 locationCode : String -> String locations : List String

slide-12
SLIDE 12

peelerLocation = substring 3 "STL-48" peelerLocation : String peelerLocation = "STL-48" |> substring 3

slide-13
SLIDE 13

peelerLocation = "STL-48" |> substring 3 peelerLocation : String locationCode = substring 3 locationCode : String -> String locations : List String type alias LocationCode = String locations = ["STL", "ORD"]

n a m i n g

slide-14
SLIDE 14

peelerLocation : LocationCode locationCode : String -> LocationCode locations : List LocationCode type alias LocationCode = String peelerLocation = "STL-48" |> substring 3 locationCode = substring 3 locations = ["STL", "ORD"]

n a m i n g

slide-15
SLIDE 15

type alias Machine = { locationCode : LocationCode , number : Int } myPeeler = { locationCode = "STL" , number = 48 } myPeeler : Machine

records

slide-16
SLIDE 16

type alias Machine = { locationCode : LocationCode , number : Int } let in parse : String -> Machine location = locationCode s num = … { locationCode = location , number = num } parse s =

expressions

slide-17
SLIDE 17

machineData = [ Location "STL" , Number 48 ] machineData : List MachineDatum

new type! constructors!

type MachineDatum = Location LocationCode | Number Int

slide-18
SLIDE 18

describe datum = case datum of Location code -> "in " ++ code Number n -> "number " ++ (toString n) describe : MachineDatum -> String

pattern matching!

type MachineDatum = Location LocationCode | Number Int

slide-19
SLIDE 19

Hello World

slide-20
SLIDE 20

Evan Czaplicki

slide-21
SLIDE 21

Hello Mouse

slide-22
SLIDE 22

Hello Deeter

slide-23
SLIDE 23

Deeter Clicks

slide-24
SLIDE 24

update model view

slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27
slide-28
SLIDE 28

small pieces encapsulated

slide-29
SLIDE 29

natural extensible

slide-30
SLIDE 30

compiler editors package manager libraries test tools build tools learning community server

slide-31
SLIDE 31
slide-32
SLIDE 32

https://derpiboo.ru/720277

slide-33
SLIDE 33

elm-lang.org

github.com/satellite-of-love/landscape

@jessitron

github.com/jessitron/elm-hello-wrold

http://guide.elm-lang.org/

slide-34
SLIDE 34

modules: explicit exports, explicit dependencies packages: required docs, enforced semantic versioning types: parameterized types, type inference, aliases, unions, records

slide-35
SLIDE 35

points about elm:

  • evolution
  • target audience (Everyone)
  • narrow objective (target experience)
  • language system (experience)
  • explicitness
slide-36
SLIDE 36

what this changes:

  • structure (framework)
  • larger components
  • global state: components can call each
  • thers' functions
  • standards for my experience
slide-37
SLIDE 37

predictability:

  • reproducibility of event model
  • deterministic dispatch
  • versioning guarantees
slide-38
SLIDE 38

Explicitness Evolution Event-based Enlightenment

slide-39
SLIDE 39

http://javkiller.deviantart.com/art/Library-colors-243633627 http://strachattack.deviantart.com/art/Queen-Chrysalis-493886766 http://ohemo.deviantart.com/art/Evolved-Chrysalis-493427839 http://mlp.wikia.com/wiki/Canterlot/Gallery