design and implementation by Rich Hickey, BDFL. * When: First preview release: 2007; 1.0 was in 2009. Some W’s What Who When by Avi Flax • avi@aviflax.com • August 2017
of work with C# and Java and was dissatisfied * He wanted a LISP that: * fast, pragmatic * embraces immutability, concurrency, and polymorphism * not constrained by backwards compatibility * empowered and accelerated by building on an established platform Why by Avi Flax • avi@aviflax.com • August 2017
even everything. * But I think itʼs actually more than the sum of its parts. * I think Clojure is… In a ! ⚡ ⚡ by Avi Flax • avi@aviflax.com • August 2017
itʼs how they fit together to enable and empower designing and building great software over time that is really ⚡Awesome⚡! * We'll revisit each of these strengths later; next I'd like to show you some examples. A cohesive toolkit for thinking & building over time by Avi Flax • avi@aviflax.com • August 2017
* Other companies using Clojure include Walmart, Chartbeat, Consumer Reports, Puppet, Beanstalk, The Climate Corporation, Thoughtworks, Cerner, Atlassian, and many more by Avi Flax • avi@aviflax.com • August 2017
to be able to read the examples. * The syntax definitely looks strange at first, but: * People generally get used to the syntax very quickly and just stop noticing it. <interlude> Syntax by Avi Flax • avi@aviflax.com • August 2017
whitespace * Prefix notation means there are very few reserved characters Calls (callee arg arg arg) (callee (callee arg) arg arg) (capitalize "park assist") (- 10 2 3) by Avi Flax • avi@aviflax.com • August 2017
and more powerful than most languages — definitely including Ruby! * Donʼt even get me started on Rubyʼs blocks :facepalm: Rosetta Slide Case Ruby Clojure Call a function sum(1, 2, 3) (+ 1 2 3) Call a method names.join(',') (join names ",") Define function def uc(s); s.upcase; end (defn uc [s] (upper-case s)) Anon. function ->(s) { s.upcase } (fn [s] (upper-case s)) Control structures if bar; foo; end (if bar foo) Passing functions ¯\_(ϑ)_/¯ (map uc names) Composing functions ¯\_(ϑ)_/¯ (comp uc reverse) by Avi Flax • avi@aviflax.com • August 2017
the Retro- Computing Society of RI display at the Vintage Computer Festival East 1.0. Image via WikiMedia Commons. It’s a LISP • Functional • Declarative • Dynamic • Interactive Development → Developer Productivity • Code as Data → Macros • Everything is an expression • Lazy by Avi Flax • avi@aviflax.com • August 2017
Mobile: primarily via ClojureScript + React Native * Serverless: via either ClojureScript+Node or JVM * Embedded: Ferret is a Clojure transpiler that transpiles Clojure to self contained portable ISO C++11. Itʼs verified to run on Arduino, Teensy, SparkFun, NodeMcu. * Erlang: Clojang is a Clojure library that enables Clojure programs to communicate with Erlang processes It’s Got Reach • JVM • CLR • JavaScript • Mobile • Serverless • Embedded • Erlang by Avi Flax • avi@aviflax.com • August 2017
Clojure, 3rd Ed.) * 4 different kinds of references for different cases Concurrency • Immutability • References • Software Transactional Memory • Atoms • Agents • Vars • CSP: lightweight routines and channels by Avi Flax • avi@aviflax.com • August 2017
Made Easy by Rich Hickey • Clojure in 10 Big Ideas by Stuart Halloway • Clojure for Rubyists — Accessing the GitHub API by Jeff Terrell* by Avi Flax • avi@aviflax.com • August 2017