Books & Videos

Table of Contents

  1. Chapter 1 Primitive Data

    1. Introduction

    2. Changing the Capitalization of a String

    3. Cleaning Up Whitespace in a String

    4. Building a String from Parts

    5. Treating a String as a Sequence of Characters

    6. Converting Between Characters and Integers

    7. Formatting Strings

    8. Searching a String by Pattern

    9. Pulling Values Out of a String Using Regular Expressions

    10. Performing Find and Replace on Strings

    11. Splitting a String into Parts

    12. Pluralizing Strings Based on a Quantity

    13. Converting Between Strings, Symbols, and Keywords

    14. Maintaining Accuracy with Extremely Large/Small Numbers

    15. Working with Rational Numbers

    16. Parsing Numbers

    17. Truncating and Rounding Numbers

    18. Performing Fuzzy Comparison

    19. Performing Trigonometry

    20. Inputting and Outputting Integers with Different Bases

    21. Calculating Statistics on Collections of Numbers

    22. Performing Bitwise Operations

    23. Generating Random Numbers

    24. Working with Currency

    25. Generating Unique IDs

    26. Obtaining the Current Date and Time

    27. Representing Dates as Literals

    28. Parsing Dates and Times Using clj-time

    29. Formatting Dates Using clj-time

    30. Comparing Dates

    31. Calculating the Length of a Time Interval

    32. Generating Ranges of Dates and Times

    33. Generating Ranges of Dates and Times Using Native Java Types

    34. Retrieving Dates Relative to One Another

    35. Working with Time Zones

    36. Converting a Unix Timestamp to a Date

    37. Converting a Date to a Unix Timestamp

  2. Chapter 2 Composite Data

    1. Introduction

    2. Creating a List

    3. Creating a List from an Existing Data Structure

    4. "Adding" an Item to a List

    5. "Removing" an Item from a List

    6. Testing for a List

    7. Creating a Vector

    8. "Adding" an Item to a Vector

    9. "Removing" an Item from a Vector

    10. Getting the Value at an Index

    11. Setting the Value at an Index

    12. Creating a Set

    13. Adding and Removing Items from Sets

    14. Testing Set Membership

    15. Using Set Operations

    16. Creating a Map

    17. Retrieving Values from a Map

    18. Retrieving Multiple Keys from a Map Simultaneously

    19. Setting Keys in a Map

    20. Using Composite Values as Map Keys

    21. Treating Maps as Sequences (and Vice Versa)

    22. Applying Functions to Maps

    23. Keeping Multiple Values for a Key

    24. Combining Maps

    25. Comparing and Sorting Values

    26. Removing Duplicate Elements from a Collection

    27. Determining if a Collection Holds One of Several Values

    28. Implementing Custom Data Structures: Red-Black Trees—Part I

    29. Implementing Custom Data Structures: Red-Black Trees—Part II

  3. Chapter 3 General Computing

    1. Introduction

    2. Running a Minimal Clojure REPL

    3. Interactive Documentation

    4. Exploring Namespaces

    5. Trying a Library Without Explicit Dependencies

    6. Running Clojure Programs

    7. Running Programs from the Command Line

    8. Parsing Command-Line Arguments

    9. Creating Custom Project Templates

    10. Building Functions with Polymorphic Behavior

    11. Extending a Built-In Type

    12. Decoupling Consumers and Producers with core.async

    13. Making a Parser for Clojure Expressions Using core.match

    14. Querying Hierarchical Graphs with core.logic

    15. Playing a Nursery Rhyme

  4. Chapter 4 Local I/O

    1. Introduction

    2. Writing to STDOUT and STDERR

    3. Reading a Single Keystroke from the Console

    4. Executing System Commands

    5. Accessing Resource Files

    6. Copying Files

    7. Deleting Files or Directories

    8. Listing Files in a Directory

    9. Memory Mapping a File

    10. Reading and Writing Text Files

    11. Using Temporary Files

    12. Reading and Writing Files at Arbitrary Positions

    13. Parallelizing File Processing

    14. Parallelizing File Processing with Reducers

    15. Reading and Writing Clojure Data

    16. Using edn for Configuration Files

    17. Emitting Records as edn Values

    18. Handling Unknown Tagged Literals When Reading Clojure Data

    19. Reading Properties from a File

    20. Reading and Writing Binary Files

    21. Reading and Writing CSV Data

    22. Reading and Writing Compressed Files

    23. Working with XML Data

    24. Reading and Writing JSON Data

    25. Generating PDF Files

    26. Making a GUI Window with Scrollable Text

  5. Chapter 5 Network I/O and Web Services

    1. Introduction

    2. Making HTTP Requests

    3. Performing Asynchronous HTTP Requests

    4. Sending a Ping Request

    5. Retrieving and Parsing RSS Data

    6. Sending Email

    7. Communicating over Queues Using RabbitMQ

    8. Communicating with Embedded Devices via MQTT

    9. Using ZeroMQ Concurrently

    10. Creating a TCP Client

    11. Creating a TCP Server

    12. Sending and Receiving UDP Packets

  6. Chapter 6 Databases

    1. Introduction

    2. Connecting to an SQL Database

    3. Connecting to an SQL Database with a Connection Pool

    4. Manipulating an SQL Database

    5. Simplifying SQL with Korma

    6. Performing Full-Text Search with Lucene

    7. Indexing Data with ElasticSearch

    8. Working with Cassandra

    9. Working with MongoDB

    10. Working with Redis

    11. Connecting to a Datomic Database

    12. Defining a Schema for a Datomic Database

    13. Writing Data to Datomic

    14. Removing Data from a Datomic Database

    15. Trying Datomic Transactions Without Committing Them

    16. Traversing Datomic Indexes

  7. Chapter 7 Web Applications

    1. Introduction

    2. Introduction to Ring

    3. Using Ring Middleware

    4. Serving Static Files with Ring

    5. Handling Form Data with Ring

    6. Handling Cookies with Ring

    7. Storing Sessions with Ring

    8. Reading and Writing Request and Response Headers in Ring

    9. Routing Requests with Compojure

    10. Performing HTTP Redirects with Ring

    11. Building a RESTful Application with Liberator

    12. Templating HTML with Enlive

    13. Templating with Selmer

    14. Templating with Hiccup

    15. Rendering Markdown Documents

    16. Building Applications with Luminus

  8. Chapter 8 Performance and Production

    1. Introduction

    2. AOT Compilation

    3. Packaging a Project into a JAR File

    4. Creating a WAR File

    5. Running an Application as a Daemon

    6. Alleviating Performance Problems with Type Hinting

    7. Fast Math with Primitive Java Arrays

    8. Simple Profiling with Timbre

    9. Logging with Timbre

    10. Releasing a Library to Clojars

    11. Using Macros to Simplify API Deprecations

  9. Chapter 9 Distributed Computation

    1. Introduction

    2. Building an Activity Feed System with Storm

    3. Processing Data with an Extract Transform Load (ETL) Pipeline

    4. Aggregating Large Files

    5. Testing Cascalog Workflows

    6. Checkpointing Cascalog Jobs

    7. Explaining a Cascalog Query

    8. Running a Cascalog Job on Elastic MapReduce

  10. Chapter 10 Testing

    1. Introduction

    2. Unit Testing

    3. Testing with Midje

    4. Thoroughly Testing by Randomizing Inputs

    5. Finding Values That Cause Failure

    6. Running Browser-Based Tests

    7. Tracing Code Execution

    8. Avoiding Null-Pointer Exceptions with core.typed

    9. Verifying Java Interop Using core.typed

    10. Type Checking Higher-Order Functions with core.typed

  1. Index

  2. Colophon