Adventures in Elm
GOTO Chicago, 24 May 2016
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
GOTO Chicago, 24 May 2016
Events, Reproducibility, and Kindness
Events, Reproducibility, and Kindness
@jessitron
Data In Data Out
UI Server
Everything that matters My Dream Appearance
+ React ClojureScript + Om Scala.js + React + Redux JavaScript
language architecture system
undefined is not a function
@mrb_bk “I tried over and over again to turn my self doubt into a pure functional program, and eventually, it clicked.”
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
peelerLocation = substring 3 "STL-48" peelerLocation : String peelerLocation = "STL-48" |> substring 3
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
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
type alias Machine = { locationCode : LocationCode , number : Int } myPeeler = { locationCode = "STL" , number = 48 } myPeeler : Machine
type alias Machine = { locationCode : LocationCode , number : Int } let in parse : String -> Machine location = locationCode s num = … { locationCode = location , number = num } parse s =
machineData = [ Location "STL" , Number 48 ] machineData : List MachineDatum
type MachineDatum = Location LocationCode | Number Int
describe datum = case datum of Location code -> "in " ++ code Number n -> "number " ++ (toString n) describe : MachineDatum -> String
type MachineDatum = Location LocationCode | Number Int
Evan Czaplicki
update model view
small pieces encapsulated
natural extensible
compiler editors package manager libraries test tools build tools learning community server
https://derpiboo.ru/720277
elm-lang.org
github.com/satellite-of-love/landscape
@jessitron
github.com/jessitron/elm-hello-wrold
http://guide.elm-lang.org/
modules: explicit exports, explicit dependencies packages: required docs, enforced semantic versioning types: parameterized types, type inference, aliases, unions, records
points about elm:
what this changes:
predictability:
Explicitness Evolution Event-based Enlightenment
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