Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Programming Erlang, Second Edition
Table of Contents
Early Praise for Programming Erlang, Second Edition
Introduction
What’s This Book About?
Who Is This Book For?
New in This Edition
Road Map
The Code in This Book
Help! It Doesn’t Work
Acknowledgments
Part 1: Why Erlang?
Chapter 1: Introducing Concurrency
1.1 Modeling Concurrency
1.2 Benefits of Concurrency
1.3 Concurrent Programs and Parallel Computers
1.4 Sequential vs. Concurrent Programming Languages
Chapter 2: A Whirlwind Tour of Erlang
2.1 The Shell
2.2 Processes, Modules, and Compilation
2.3 Hello, Concurrency
Part 2: Sequential Programming
Chapter 3: Basic Concepts
3.1 Starting and Stopping the Erlang Shell
3.2 Simple Integer Arithmetic
3.3 Variables
3.4 Floating-Point Numbers
3.5 Atoms
3.6 Tuples
3.7 Lists
3.8 Strings
3.9 Pattern Matching Again
Chapter 4: Modules and Functions
4.1 Modules Are Where We Store Code
4.2 Back to Shopping
4.3 Funs: The Basic Unit of Abstraction
4.4 Simple List Processing
4.5 List Comprehensions
4.6 BIFs
4.7 Guards
4.8 case and if Expressions
4.9 Building Lists in Natural Order
4.10 Accumulators
Chapter 5: Records and Maps
5.1 When to Use Maps or Records
5.2 Naming Tuple Items with Records
5.3 Maps: Associative Key-Value Stores
Chapter 6: Error Handling in Sequential Programs
6.1 Handling Errors in Sequential Code
6.2 Trapping an Exception with try…catch
6.3 Trapping an Exception with catch
6.4 Programming Style with Exceptions
6.5 Stack Traces
6.6 Fail Fast and Noisily, Fail Politely
Chapter 7: Binaries and the Bit Syntax
7.1 Binaries
7.2 The Bit Syntax
7.3 Bitstrings: Processing Bit-Level Data
Chapter 8: The Rest of Sequential Erlang
8.1 apply
8.2 Arithmetic Expressions
8.3 Arity
8.4 Attributes
8.5 Block Expressions
8.6 Booleans
8.7 Boolean Expressions
8.8 Character Set
8.9 Comments
8.10 Dynamic Code Loading
8.11 Erlang Preprocessor
8.12 Escape Sequences
8.13 Expressions and Expression Sequences
8.14 Function References
8.15 Include Files
8.16 List Operations ++ and - -
8.17 Macros
8.18 Match Operator in Patterns
8.19 Numbers
8.20 Operator Precedence
8.21 The Process Dictionary
8.22 References
8.23 Short-Circuit Boolean Expressions
8.24 Term Comparisons
8.25 Tuple Modules
8.26 Underscore Variables
Chapter 9: Types
9.1 Specifying Data and Function Types
9.2 Erlang Type Notation
9.3 A Session with the Dialyzer
9.4 Type Inference and Success Typing
9.5 Limitations of the Type System
Chapter 10: Compiling and Running Your Program
10.1 Modifying the Development Environment
10.2 Different Ways to Run Your Program
10.3 Automating Compilation with Makefiles
10.4 When Things Go Wrong
10.5 Getting Help
10.6 Tweaking the Environment
Part 3: Concurrent and Distributed Programs
Chapter 11: Real-World Concurrency
Chapter 12: Concurrent Programming
12.1 The Concurrency Primitives
12.2 Introducing Client-Server
12.3 Processes Are Cheap
12.4 Receive with a Timeout
12.5 Selective Receive
12.6 Registered Processes
12.7 A Word About Tail Recursion
12.8 Spawning with MFAs or Funs
Chapter 13: Errors in Concurrent Programs
13.1 Error Handling Philosophy
13.2 Error Handling Semantics
13.3 Creating Links
13.4 Groups of Processes That All Die Together
13.5 Setting Up a Firewall
13.6 Monitors
13.7 Error Handling Primitives
13.8 Programming for Fault Tolerance
Chapter 14: Distributed Programming
14.1 Two Models for Distribution
14.2 Writing a Distributed Program
14.3 Building the Name Server
14.4 Libraries and BIFS for Distributed Programming
14.5 The Cookie Protection System
14.6 Socket-Based Distribution
Part 4: Programming Libraries and Frameworks
Chapter 15: Interfacing Techniques
15.1 How Erlang Communicates with External Programs
15.2 Interfacing an External C Program with a Port
15.3 Calling a Shell Script from Erlang
15.4 Advanced Interfacing Techniques
Chapter 16: Programming with Files
16.1 Modules for Manipulating Files
16.2 Ways to Read a File
16.3 Ways to Write a File
16.4 Directory and File Operations
16.5 Bits and Pieces
16.6 A Find Utility
Chapter 17: Programming with Sockets
17.1 Using TCP
17.2 Active and Passive Sockets
17.3 Error Handling with Sockets
17.4 UDP
17.5 Broadcasting to Multiple Machines
17.6 A SHOUTcast Server
Chapter 18: Browsing with Websockets and Erlang
18.1 Creating a Digital Clock
18.2 Basic Interaction
18.3 An Erlang Shell in the Browser
18.4 Creating a Chat Widget
18.5 IRC Lite
18.6 Graphics in the Browser
18.7 The Browser Server Protocol
Chapter 19: Storing Data with ETS and DETS
19.1 Types of Table
19.2 ETS Table Efficiency Considerations
19.3 Creating an ETS Table
19.4 Example Programs with ETS
19.5 Storing Tuples on Disk
19.6 What Haven’t We Talked About?
Chapter 20: Mnesia: The Erlang Database
20.1 Creating the Initial Database
20.2 Database Queries
20.3 Adding and Removing Data in the Database
20.4 Mnesia Transactions
20.5 Storing Complex Data in Tables
20.6 Table Types and Location
20.7 The Table Viewer
20.8 Digging Deeper
Chapter 21: Profiling, Debugging, and Tracing
21.1 Tools for Profiling Erlang Code
21.2 Testing Code Coverage
21.3 Generating Cross-References
21.4 Compiler Diagnostics
21.5 Runtime Diagnostics
21.6 Debugging Techniques
21.7 The Erlang Debugger
21.8 Tracing Messages and Process Execution
21.9 Frameworks for Testing Erlang Code
Chapter 22: Introducing OTP
22.1 The Road to the Generic Server
22.2 Getting Started with gen_server
22.3 The gen_server Callback Structure
22.4 Filling in the gen_server Template
22.5 Digging Deeper
Chapter 23: Making a System with OTP
23.1 Generic Event Handling
23.2 The Error Logger
23.3 Alarm Management
23.4 The Application Servers
23.5 The Supervision Tree
23.6 Starting the System
23.7 The Application
23.8 File System Organization
23.9 The Application Monitor
23.10 How Did We Make That Prime?
23.11 Digging Deeper
Part 5: Building Applications
Chapter 24: Programming Idioms
24.1 Maintaining the Erlang View of the World
24.2 A Multipurpose Server
24.3 Stateful Modules
24.4 Adapter Patterns
24.5 Intentional Programming
Chapter 25: Third-Party Programs
25.1 Making a Shareable Archive and Managing Your Code with Rebar
25.2 Integrating External Programs with Our Code
25.3 Making a Local Copy of the Dependencies
25.4 Building Embedded Web Servers with Cowboy
Chapter 26: Programming Multicore CPUs
26.1 Good News for Erlang Programmers
26.2 How to Make Programs Run Efficiently on a Multicore CPU
26.3 Parallelizing Sequential Code
26.4 Small Messages, Big Computations
26.5 Parallelizing Computations with mapreduce
Chapter 27: Sherlock’s Last Case
27.1 Finding Similarities in Data
27.2 A Session with Sherlock
27.3 The Importance of Partitioning the Data
27.4 Adding Keywords to the Postings
27.5 Overview of the Implementation
27.6 Exercises
27.7 Wrapping Up
Appendix 1: OTP Templates
A1.1 The Generic Server Template
A1.2 The Supervisor Template
A1.3 The Application Template
Appendix 2: A Socket Application
A2.1 An Example
A2.2 How lib_chan Works
A2.3 The lib_chan Code
Appendix 3: A Simple Execution Environment
A3.1 How Erlang Starts
A3.2 Running Some Test Programs in SEE
A3.3 The SEE API
A3.4 SEE Implementation Details
A3.5 How Code Gets Loaded in Erlang
You May Be Interested In…
← Prev
Back
Next →
← Prev
Back
Next →