will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot." - Eric Raymond, "How to Become a Hacker" Tuesday, July 3, 12
misuse a computer". I think that description is a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts." - Edsger Dijkstra Tuesday, July 3, 12
name LISP derives from LISt Processing. • Lisp source code is made up of lists. • Homoiconic: Code is data. Data is code. (def lisp “Your grandpa’s language”) Tuesday, July 3, 12
in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world.” Side Effects Tuesday, July 3, 12
default) • First item is treated as a function name • Remaining items are the arguments • Can also be treated as data => (+ 1 2 3) 6 => ‘(+ 1 2 3) (+ 1 2 3) Tuesday, July 3, 12
3]) (2 3 4) ; anonymous function, add 10 => (map #(+ 10 %) [1 2 3]) (11 12 13) Applies a function to each element in a collection and returns a new collection Tuesday, July 3, 12
Ignoring complexity will slow you down long term • Many tools that are easy to use yield complex results • Complect: to intertwine, entwine, or braid things • Compose: to place together • Composing simple components - the key to robust software Tuesday, July 3, 12
WSGI • Handlers are functions that take requests at Clojure Maps • and return responses as a Clojure Map • Adapters run handlers on a web server • Middleware augment handlers Ring Tuesday, July 3, 12
Lisp on Paper - http://www.flickr.com/photos/phil-jackson/3044578328/ Functional Bag of Goodies - http://www.flickr.com/photos/beorn_ours/5675267679/ Side Effect Pedals - http://www.flickr.com/photos/terekhova/4629820574/ Dye Water Glasses - http://www.flickr.com/photos/pyth0ns/4816846174/ Galaxy - http://www.flickr.com/photos/skiwalker79/3855880846/ Series of Bullets - http://www.flickr.com/photos/dvids/7204296286/ Coffee Beans - http://www.flickr.com/photos/kubina/1469914113/sizes/l/in/photostream/ Bird Formation - http://www.flickr.com/photos/deapeajay/2694162918/ Great Wall - http://www.flickr.com/photos/franck-chilli/3882326984 Tuesday, July 3, 12