├── Normand - The Elements of a Functional Programming Mindset ├── Normand - The Elements of a Functional Programming Mindset.pdf └── average.clj ├── README.md ├── Stevenson - Guiding people into Clojure └── Stevenson - Guiding people into Clojure.pdf ├── Tsao - Structured Declarative Data Visualization in Clojure ├── README.md └── tsao-structured-declarative-data-visualization-in-clojure.pdf ├── drogalis-designing-with-data.pdf ├── jones-beyond-top-command-line-monitoring-on-the-jvm.pdf ├── peric-optimizing-performance-in-real-world-problems.pdf ├── polinsky-functions.vs.components.pdf ├── stepien-erlang-in-the-land-of-lisp.pdf └── yarwood-alda-a-music-programming-language-built-with-clojure.pdf /Normand - The Elements of a Functional Programming Mindset/Normand - The Elements of a Functional Programming Mindset.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/Normand - The Elements of a Functional Programming Mindset/Normand - The Elements of a Functional Programming Mindset.pdf -------------------------------------------------------------------------------- /Normand - The Elements of a Functional Programming Mindset/average.clj: -------------------------------------------------------------------------------- 1 | (defn fetch-records 2 | ([] 3 | (fetch-records 100)) 4 | ([n] 5 | (lazy-seq 6 | (when (pos? n) 7 | (Thread/sleep 100) 8 | (cons {:score n 9 | :age (* 3 n)} 10 | (fetch-records (dec n))))))) 11 | 12 | (def record-sum (atom 0)) 13 | (def record-count (atom 0)) 14 | 15 | (defn average-records [] 16 | (doseq [record (fetch-records)] 17 | (swap! record-sum + (:score record)) 18 | (swap! record-count + 1)) 19 | (/ @record-sum @record-count)) 20 | 21 | (defn accumulate-average [record-average id] 22 | (doseq [record (fetch-records id)] 23 | (swap! record-average 24 | (fn [{:keys [sum count]}] 25 | {:sum (+ sum (:score record)) 26 | :count (+ count 1) 27 | :finished false}))) 28 | (swap! record-average assoc :finished true)) 29 | 30 | (defn calculate-average [{:keys [sum count finished]}] 31 | [(/ sum count) finished]) 32 | 33 | (defn average-records [id] 34 | (let [record-average 35 | (atom {:sum 0 36 | :count 0 37 | :finished false})] 38 | (future (accumulate-average record-average id)) 39 | (fn [] (calculate-average record-average)))) 40 | 41 | (defn accumulate [accum finish vals] 42 | (doseq [val vals] 43 | (accum val)) 44 | (finish)) 45 | 46 | (defn average-accumulator [] 47 | (let [average (atom {:sum 0 48 | :count 0 49 | :finished false})] 50 | [(fn [val] 51 | (swap! average 52 | (fn [{:keys [sum count]}] 53 | {:sum (+ sum val) 54 | :count (+ count 1) 55 | :finished false}))) 56 | (fn [] (swap! average assoc :finished true)) 57 | (fn [] 58 | (let [{:keys [sum count finished]} @average] 59 | [(/ sum count) finished]))])) 60 | 61 | (defn average [f vals] 62 | (let [[accum finish current] (average-accumulator)] 63 | (future (accumulate (comp accum f) finish vals)) 64 | current)) 65 | 66 | (defn sum-accumulator [] 67 | (let [average (atom {:sum 0 68 | :finished false})] 69 | [(fn [val] 70 | (swap! average 71 | (fn [{:keys [sum]}] 72 | {:sum (+ sum val) 73 | :finished false}))) 74 | (fn [] (swap! average assoc :finished true)) 75 | (fn [] 76 | (let [{:keys [sum finished]} @average] 77 | [sum finished]))])) 78 | 79 | (defn sum [f vals] 80 | (let [[accum finish current] (sum-accumulator)] 81 | (future (accumulate (comp accum f) finish vals)) 82 | current)) 83 | 84 | ;; Example of calculating the sum 85 | 86 | (comment 87 | (def sum-progress (sum :age (fetch-records 1000000))) 88 | (println (sum-progress))) 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Clojure Remote 2016 Slides 2 | 3 | In this repository you will find slides from [Clojure Remote](clojureremote.com) 2016's presentations. 4 | 5 | ## Speakers 6 | 7 | To contribute your slides, open a pull request to the project adding: 8 | 9 | * A presentation file(s) named like ` - .{pdf,ppt}`. Preference goes to PDF and other portable formats. 10 | * A folder named ` - ` with your slides and any supporting material. 11 | 12 | By contributing your slides, you agree to share them under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 13 | 14 | ## License 15 | 16 | Creative Commons License 17 | 18 | This work is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License](http://creativecommons.org/licenses/by-nc-nd/4.0/). 19 | -------------------------------------------------------------------------------- /Stevenson - Guiding people into Clojure/Stevenson - Guiding people into Clojure.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/Stevenson - Guiding people into Clojure/Stevenson - Guiding people into Clojure.pdf -------------------------------------------------------------------------------- /Tsao - Structured Declarative Data Visualization in Clojure/README.md: -------------------------------------------------------------------------------- 1 | Links 2 | --- 3 | - [gyptis](https://github.com/dvdt/gyptis) 4 | - [demo code](https://github.com/dvdt/gyptis-cljremote) 5 | -------------------------------------------------------------------------------- /Tsao - Structured Declarative Data Visualization in Clojure/tsao-structured-declarative-data-visualization-in-clojure.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/Tsao - Structured Declarative Data Visualization in Clojure/tsao-structured-declarative-data-visualization-in-clojure.pdf -------------------------------------------------------------------------------- /drogalis-designing-with-data.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/drogalis-designing-with-data.pdf -------------------------------------------------------------------------------- /jones-beyond-top-command-line-monitoring-on-the-jvm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/jones-beyond-top-command-line-monitoring-on-the-jvm.pdf -------------------------------------------------------------------------------- /peric-optimizing-performance-in-real-world-problems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/peric-optimizing-performance-in-real-world-problems.pdf -------------------------------------------------------------------------------- /polinsky-functions.vs.components.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/polinsky-functions.vs.components.pdf -------------------------------------------------------------------------------- /stepien-erlang-in-the-land-of-lisp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/stepien-erlang-in-the-land-of-lisp.pdf -------------------------------------------------------------------------------- /yarwood-alda-a-music-programming-language-built-with-clojure.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homegrownlabs/clojure-remote-2016/defeaf506a93dc02a7a3138c43cf08bf50aa195a/yarwood-alda-a-music-programming-language-built-with-clojure.pdf --------------------------------------------------------------------------------