Video description
"A cornucopia of programming concepts."
William E. Byrd and Daniel P. Friedman, authors of "The Reasoned Schemer"
The Joy of Clojure, Second Edition is a deep account of the Clojure language. Fully updated for Clojure 1.6, this edition goes beyond the syntax to show you how to write fluent Clojure code. You'll learn functional and declarative approaches to programming and will master techniques that make Clojure elegant and efficient. The book shows you how to solve hard problems related to concurrency, interoperability, and performance, and how great it can be to think in the Clojure way.
The Clojure programming language is a dialect of Lisp that runs on the Java Virtual Machine and JavaScript runtimes. It is a functional programming language that offers great performance, expressive power, and stability by design. It gives you built-in concurrency and the predictable precision of immutable and persistent data structures. And it's really, really fast. The instant you see long blocks of Java or Ruby dissolve into a few lines of Clojure, you'll know why the authors of this book call it a "joyful language." It's no wonder that enterprises like Staples are betting their infrastructure on Clojure.
Inside:
- Build web apps using ClojureScript
- Master functional programming techniques
- Simplify concurrency
- Covers Clojure 1.6
Michael Fogus and Chris Houser are contributors to the Clojure and ClojureScript programming languages and the authors of various Clojure libraries and language features.
Clojure changes the way we think about programming—this book changes the way we think about Clojure.
Cristofer Weber, NeoGrid
Clear examples for both novice and experienced programmers.
Jasper Lievisse Adriaanse, M:Tier
A joy to read. I couldn't put it down.
Heather Campbell, Kainos
NARRATED BY MARK THOMAS
Table of Contents
Part 1. Foundations
Chapter 1. Clojure philosophy
Chapter 1. Clarity
Chapter 1. Why a(nother) Lisp?
Chapter 1. But what’s with all the parentheses?
Chapter 1. Functional programming
Chapter 1. Why Clojure isn’t especially object-oriented
Chapter 1. Most of what OOP gives you, Clojure provides
Chapter 2. Drinking from the Clojure fire hose
Chapter 2. Floating-point numbers
Chapter 2. Putting things together: collections
Chapter 2. Making things happen: calling functions
Chapter 2. Functions with multiple arities
Chapter 2. Locals, loops, and blocks
Chapter 2. Preventing things from happening: quoting
Chapter 2. Using host libraries via interop
Chapter 2. Exceptional circumstances
Chapter 3. Dipping your toes in the pool
Chapter 3. Nil pun with care
Chapter 3. Destructuring with a map
Chapter 3. Using the REPL to experiment
Chapter 3. Putting it all together
Part 2. Data types
Chapter 4. On scalars
Chapter 4. Trying to be rational
Chapter 4. When to use keywords
Chapter 4. Symbolic resolution
Chapter 4. Regular expressions—the second problem
Chapter 5. Collection types
Chapter 5. Sequence terms and what they mean
Chapter 5. Big-O
Chapter 5. Vectors: creating and using them in all their varieties
Chapter 5. Vectors as stacks
Chapter 5. Vectors as map entries
Chapter 5. Lists: Clojure’s code-form data structure
Chapter 5. How to use persistent queues
Chapter 5. Persistent sets
Chapter 5. Thinking in maps
Chapter 5. Putting it all together: finding the position of items in a sequence
Part 3. Functional programming techniques
Chapter 6. Being lazy and set in your ways
Chapter 6. Structural sharing: a persistent toy
Chapter 6. Laziness
Chapter 6. Losing your head
Chapter 6. Putting it all together: a lazy quicksort
Chapter 7. Functional programming
Chapter 7. Higher-order functions
Chapter 7. Pure functions
Chapter 7. On closures
Chapter 7. Sharing closure context
Chapter 7. Thinking recursively
Chapter 7. Tail calls and recur
Chapter 7. Don’t forget your trampoline
Chapter 7. Putting it all together: A* pathfinding
Part 4. Large-scale design
Chapter 8. Macros
Chapter 8. Syntax-quote, unquote, and splicing
Chapter 8. Defining control structures
Chapter 8. Macros combining forms
Chapter 8. Using macros to control symbolic resolution time
Chapter 8. Using macros to manage resources
Chapter 9. Combining data and code
Chapter 9. Expose only what’s needed
Chapter 9. Exploring Clojure multimethods with the Universal Design Pattern
Chapter 9. Ad hoc hierarchies for inherited behaviors
Chapter 9. Types, protocols, and records
Chapter 9. Protocols
Chapter 9. Sharing method implementations
Chapter 9. Building from a more primitive base with deftype
Chapter 9. Clojure implementation
Chapter 10. Mutation and concurrency
Chapter 10. Using refs for a mutable game board
Chapter 10. The things that STM makes easy
Chapter 10. Refactoring with refs
Chapter 10. Vulgar change with ref-set
Chapter 10. When to use agents
Chapter 10. The difference between send and send-off
Chapter 10. When to use atoms
Chapter 10. When to use locks
Chapter 10. Vars and dynamic binding
Chapter 10. Dynamic scope
Chapter 11. Parallelism
Chapter 11. Futures as callbacks
Chapter 11. When to use promises
Chapter 11. Parallel operations
Chapter 11. A brief introduction to reducer/fold
Part 5. Host symbiosis
Chapter 12. Java.next
Chapter 12. A simple dynamic web service
Chapter 12. Anaphoric proxy
Chapter 12. Clojure gen-class and GUI programming
Chapter 12. Clojure’s relationship to Java arrays
Chapter 12. All Clojure functions implement …
Chapter 12. Using Clojure data structures in Java APIs
Chapter 12. The definterface macro
Chapter 12. Be wary of exceptions
Chapter 12. Handling exceptions
Chapter 13. Why ClojureScript?
Chapter 13. Compiler internals: analysis vs. emission
Chapter 13. Web Audio
Chapter 13. Advanced compilation
Chapter 13. Generating an externs.js file
Chapter 13. Compile vs. run
Part 6. Tangential considerations
Chapter 14. Data-oriented programming
Chapter 14. Common ways to derive information from data
Chapter 14. Data as data
Chapter 14. The benefits of value
Chapter 14. Tagged literals
Chapter 14. Data as code
Chapter 14. Case study: simple event sourcing
Chapter 14. Simulation testing
Chapter 14. Code as data as code
Chapter 14. Putting parentheses around the specification
Chapter 15. Performance
Chapter 15. Transients
Chapter 15. Chunked sequences
Chapter 15. Memoization
Chapter 15. Understanding coercion
Chapter 15. Reducibles
Chapter 15. More reducing function transformers
Chapter 15. Performance of reducibles
Chapter 15. The fold function: reducing in parallel
Chapter 16. Thinking programs
Chapter 16. A brute-force Sudoku solver
Chapter 16. Thinking data via unification
Chapter 16. Substitution
Chapter 16. An introduction to core.logic
Chapter 16. Subgoals
Chapter 16. Constraints
Chapter 16. Solving Sudoku with finite domains
Chapter 17. Clojure changes the way you think
Chapter 17. Implementing a SQL-like DSL to generate queries
Chapter 17. Testing
Chapter 17. Contracts programming
Chapter 17. Invisible design patterns
Chapter 17. Clojure’s first-class design patterns
Chapter 17. Iterator pattern
Chapter 17. Error handling and debugging
Chapter 17. Debugging